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  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
****************************************/

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to