Bugs in to_char function

From: "Tom Rogers" <trogers3(at)creigh(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Bugs in to_char function
Date: 2000-10-17 14:47:40
Message-ID: NDBBIAKKEKMAJKGJNMINIEENCEAA.trogers3@creigh.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2000-10-17 15:32:43 SELECTs return error with oid in WHERE clause
Previous Message Palle Girgensohn 2000-10-17 12:54:19 The Data Base System is in recovery mode

Browse pgsql-patches by date

  From Date Subject
Next Message Lennert Buytenhek 2000-10-17 23:32:32 [PATCH] allow specifying allowed user in 'trust' hba entries
Previous Message Mark Hollomon 2000-10-17 14:26:57 Re: Re: New relkind for views