Re: How to extract hour and minutes from a timestamp

Поиск
Список
Период
Сортировка
Искать
От
Josh Berkus
Тема
Re: How to extract hour and minutes from a timestamp
Дата
Msg-id
web-1790252@davinci.ethosmedia.com
Ответ на
Список
Дерево обсуждения
How to extract hour and minutes from a timestamp Tan ga <gndtanga@mail.pt>
Re: How to extract hour and minutes from a timestamp Andrew McMillan <andrew@catalyst.net.nz>
Re: How to extract hour and minutes from a timestamp "Josh Berkus" <josh@agliodbs.com>
Tan ga,
 
> I already resolver my other problem but now i would like to extract
> both
> time and hour from a timestamp in order to compare with a string.
> Ex 2000-01-01 19:30:00 
> I want the result to be 19:30

Check out "Functions and Operators" in the online user manual.

What you want is:

SELECT to_char(some_timestamp, 'HH:MI');

-Josh Berkus
В списке pgsql-novice по дате отправления
От: Andrew McMillan
Дата:
От: Randy Neumann
Дата:
FAQ