From: | Csaba Nagy <nagy(at)ecircle-ag(dot)com> |
---|---|
To: | Todd P Marek <affe23(at)somahq(dot)com> |
Cc: | Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Mailing |
Date: | 2004-10-05 14:41:28 |
Message-ID: | 1096987288.3291.41.camel@localhost.localdomain |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I would thought it would be an obvious try:
cnagy=> select to_char(now(), 'HH:MM AM');
to_char
----------
04:10 PM
(1 row)
HTH,
Csaba.
On Tue, 2004-10-05 at 16:32, Todd P Marek wrote:
> Hello-
>
> I am in the process of translating a site using mysql as the
> backendover to postgres. I have a lot of time data that I would like
> todisplay to the user in the form of a schedule.
>
> I am using the to_char function to make the times human friendly
>
> to_char(class_schedule.endtime, 'HH:MI:SS AM')
>
> which returns
>
> 06:30:00 AM - 07:30:00 AM
>
> I am really looking to get it outputting like this.
>
> 6:30 AM - 7:30 AM
>
> I have looked through the documentation andhaven't found anything to
> do this in postgres. I am going to have todo this formating in the
> application layer?
>
> Thanks
> Todd Marek
>
> "If you think you understand somethingit's habit."
> --Gary Kraftsow--
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2004-10-05 14:43:49 | Re: Mailing |
Previous Message | Tom Lane | 2004-10-05 14:37:00 | Re: Random not so random |