Re: extracting date FROM timestamp

Поиск
Список
Период
Сортировка
От Arjen van der Meijden
Тема Re: extracting date FROM timestamp
Дата
Msg-id 3FE6D6C7.3020600@vulcanus.its.tudelft.nl
обсуждение исходный текст
Ответ на extracting date FROM timestamp  (javier garcia - CEBAS <rn001@cebas.csic.es>)
Список pgsql-general
Javier,

Try casting, like so:
select current_timestamp::date;
(note, pgsql won't be able to use an index for a casted field)

Best regards,

Arjen

javier garcia - CEBAS wrote:
> Hi;
> Please. Could you tell me the more simple way to extract the 'date' part of a
> timestamp value.
> I guess we could extract the year, month, and day subfields and concatenate
> them. But, isn't there a more direct way?
>
> Best regards,
>
> Javier
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>




В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: questions about tsearch2 (for czech language)
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: extracting date FROM timestamp