Re: Date Formatting - Mailing list pgsql-novice

From Oliver Elphick
Subject Re: Date Formatting
Date
Msg-id 1020467606.11663.53.camel@linda
Whole thread Raw
In response to Date Formatting  (Tom Ansley <tansley@law.du.edu>)
List pgsql-novice
On Fri, 2002-05-03 at 20:31, Tom Ansley wrote:
> I am writing timestamps to file and the formatting is currently 2002-06-06
> 00:00:00.0.  Is there a function to only write the date and also to format it
> something like MM/dd/yyyy   ?

to_char(timestamp,format_text)

For your particular example, format_text = 'MM/DD/YYYY'

Users' Manual section 4.7

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "Live in harmony with one another. Do not be proud, but
      be willing to associate with people of low position.
      Do not be conceited."            Romans 12:16

Attachment

pgsql-novice by date:

Previous
From: Tom Ansley
Date:
Subject: Date Formatting
Next
From: Vijay Deval
Date:
Subject: Re: Tricky query