Re: Mailing - Mailing list pgsql-general

From Robby Russell
Subject Re: Mailing
Date
Msg-id 1096988303.15194.2.camel@vacant
Whole thread Raw
In response to Mailing  (Todd P Marek <affe23@somahq.com>)
List pgsql-general
On Tue, 2004-10-05 at 09:32 -0500, Todd P Marek wrote:
>
>
> ______________________________________________________________________
>
> Hello-
>
> I am in the process of translating a site using mysql as the backend
> over to postgres.  I have a lot of time data that I would like to
> display 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
>

Yeah, you're getting exactly what you're asking PostgreSQL to give you.
Drop the ':SS' if you don't want the seconds.

You can find out more about how you can format your date/times here:
http://www.postgresql.org/docs/current/static/functions-
formatting.html#FUNCTIONS-FORMATTING-DATETIME-TABLE


Good luck,

Robby


--
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | robby@planetargon.com
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
****************************************/


Attachment

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Mailing
Next
From: Kevin Barnard
Date:
Subject: Re: Mailing