Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yd6Nq-0003oP-92 for pgsql-bugs@arkaria.postgresql.org; Wed, 01 Apr 2015 00:19:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yd6Np-00070p-FI for pgsql-bugs@arkaria.postgresql.org; Wed, 01 Apr 2015 00:19:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yd6No-0006zY-JL for pgsql-bugs@postgresql.org; Wed, 01 Apr 2015 00:19:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yd6Nh-0000tm-7p for pgsql-bugs@postgresql.org; Wed, 01 Apr 2015 00:19:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t310JbaB027362; Tue, 31 Mar 2015 20:19:37 -0400 From: Tom Lane To: "Kistler, Winnie C." cc: "pgsql-bugs@postgresql.org" Subject: Re: Problem with date formatting and FM In-reply-to: References: Comments: In-reply-to "Kistler, Winnie C." message dated "Mon, 30 Mar 2015 13:50:09 -0000" Date: Tue, 31 Mar 2015 20:19:37 -0400 Message-ID: <27361.1427847577@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org "Kistler, Winnie C." 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