Re: Timestamp to date conversion...plz help me - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Timestamp to date conversion...plz help me
Date
Msg-id 20031018174932.GA15465@dcc.uchile.cl
Whole thread Raw
In response to Timestamp to date conversion...plz help me  ("Jitender Kumar C" <Jitender.Chakka@igate.com>)
List 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)

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.4b4 domain usage and select question
Next
From: CSN
Date:
Subject: Re: restart and postgres.conf