Re: Extracting date from timestamp

From: Richard Huxton <dev(at)archonet(dot)com>
To: Nageshwar Rao <NageshwarR(at)PLANETASIA(dot)COM>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Extracting date from timestamp
Date: 2005-05-06 13:40:37
Message-ID: 427B73D5.5020307@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nageshwar Rao wrote:
> How to extract date(mm/dd/yyy) from a timestamp .

See chapter 9.8. Data Type Formatting Functions, all about to_char()

If you just want your preset format you can use SELECT now()::date;

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-05-06 13:43:52 Re: postmaster crash - another server process exited abnormally
Previous Message Brad Nicholson 2005-05-06 13:38:50 Re: Slony v. DBMirror