Re: Timestamp to date conversion...plz help me

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Jitender Kumar C <Jitender(dot)Chakka(at)igate(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Timestamp to date conversion...plz help me
Date: 2003-10-18 17:49:33
Message-ID: 20031018174932.GA15465@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Oct 18, 2003 at 10:21:03PM +0530, Jitender Kumar C wrote:
> Hi,
> I want to extract date part (mm/dd/yy or any other date format) of
> Timestamp in postgreSQL. Can anyone help me out how I can
> proceed?.

SELECT your-timestamp-value::date

or, more standard,
SELECT CAST(your-timestamp-value AS date)

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"When the proper man does nothing (wu-wei),
his thought is felt ten thousand miles." (Lao Tse)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message CSN 2003-10-18 18:54:07 Re: restart and postgres.conf
Previous Message Tom Lane 2003-10-18 17:12:41 Re: 7.4b4 domain usage and select question