Re: Date Formatting

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: tansley(at)law(dot)du(dot)edu
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Date Formatting
Date: 2002-05-03 23:13:26
Message-ID: 1020467606.11663.53.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Elphick(at)lfix(dot)co(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Vijay Deval 2002-05-04 13:05:40 Re: Tricky query
Previous Message Kristian Skrede Gleditsch 2002-05-03 22:54:04