From: Kistler, Winnie C. <kistlerwc@ornl.gov>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Kistler, Winnie C. <kistlerwc@ornl.gov>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: Problem with date formatting and FM
Date: Wed, 1 Apr 2015 10:52:44 +0000
Message-ID: <D1414467.CDFA%w28@ornl.gov> (raw)
In-Reply-To: <27361.1427847577@sss.pgh.pa.us>
References: <D13ECCCE.18A20%kistlerwc@ornl.gov>
<27361.1427847577@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Tom,
Thanks for your reply. It is odd that it is behaving differently on our
system. I tried your example instead of using the "entry_date" column
just to be absolutely sure, and I get the same error. I also tried
toggling the "FM" but it doesn't seem to work like it does on Oracle. Will
check with EDB to see what they say.
Thank you,
Winnie Kistler
On 3/31/15 8:19 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>"Kistler, Winnie C." <kistlerwc@ornl.gov> writes:
>> I am noticing that whenever I put "FM" in front of the date (DD), it
>>seems to affect the hour and minutes of the time as well.
>> So for example:
>> to_char(entry_date, 'Mon FMDD YYYY HH12:MIAM') converts '2014-04-01
>>15:07:00' to 'Apr 1 2014 3:7PM'
>> In this example, I would expect the result to look like: 'Apr 1 2014
>>03:07PM'
>
>I can't reproduce that.
>
>regression=# select to_char('2014-04-01 15:07:00'::timestamp, 'Mon DD
>YYYY HH12:MIAM');
> to_char
>---------------------
> Apr 01 2014 03:07PM
>(1 row)
>
>regression=# select to_char('2014-04-01 15:07:00'::timestamp, 'Mon FMDD
>YYYY HH12:MIAM');
> to_char
>--------------------
> Apr 1 2014 03:07PM
>(1 row)
>
>> We are using PostgreSQL version 9.4.1.4.
>> EnterpriseDB 9.4.1.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC)
>>4.1.2 20080704 (Red Hat 4.1.2-55), 64-bit
>
>Hm. You should be asking EDB for support then, not the PG community.
>But I wonder whether EDB has modified their version to be more
>Oracle-like on this point.
>
> regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: kistlerwc@ornl.gov, tgl@sss.pgh.pa.us
Subject: Re: Problem with date formatting and FM
In-Reply-To: <D1414467.CDFA%w28@ornl.gov>
References: <D13ECCCE.18A20%kistlerwc@ornl.gov> <27361.1427847577@sss.pgh.pa.us> <D1414467.CDFA%w28@ornl.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox