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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Timestamp to date conversion...plz help me
Дата
Msg-id 20031018174932.GA15465@dcc.uchile.cl
обсуждение исходный текст
Ответ на Timestamp to date conversion...plz help me  ("Jitender Kumar C" <Jitender.Chakka@igate.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.4b4 domain usage and select question
Следующее
От: CSN
Дата:
Сообщение: Re: restart and postgres.conf