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>)
Список pgsql-novice
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
Дата:
Сообщение: Re: How to extract hour and minutes from a timestamp
Следующее
От: Randy Neumann
Дата:
Сообщение: Re: char() or varchar() for frequently used column