Bugs in to_char function - Mailing list pgsql-bugs

From Tom Rogers
Subject Bugs in to_char function
Date
Msg-id NDBBIAKKEKMAJKGJNMINIEENCEAA.trogers3@creigh.com
Whole thread Raw
Responses Re: Bugs in to_char function
Re: Bugs in to_char function
List pgsql-bugs
I wanted to include the following in a select statement:

to_char(departtime, 'HH12:MI PM') as xdepart

This gives the correct meridian value for all AM times but incorrectly
returns an AM meridian for PM times between 12:00 PM and 1:50:59 PM.  If I
create the formatted Hours using 'HH24', the displayed 24 hour clock time is
correct.

I am using PostgreSQL version 7.0.2 on a RedHat Linux 6.2.

This is not a super critical problem for me because in this application it's
actually more correct for me to be using the 24 hour clock anyway, but I
just thought you might want to know about it.  I would like to know though,
whether this is legitimate and I hope I'm not trying to do this incorrectly.

Thank you
Tom Rogers

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Field Separator setting not used.
Next
From: Ilya Goldberg
Date:
Subject: OID in WHERE clause of SELECT results in error