Re: TIME column manipulation/comparison hangups

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: TIME column manipulation/comparison hangups
Дата
Msg-id dcc563d10811031111o2035abf4w7596f8f21c42f9c3@mail.gmail.com
обсуждение исходный текст
Ответ на TIME column manipulation/comparison hangups  (Bill Moran <wmoran@collaborativefusion.com>)
Ответы Re: TIME column manipulation/comparison hangups  (Bill Moran <wmoran@collaborativefusion.com>)
Список pgsql-general
On Mon, Nov 3, 2008 at 12:01 PM, Bill Moran
<wmoran@collaborativefusion.com> wrote:
>
> I'm trying to test the time in a time column to see if it's the same
> minute as the current time.  I wouldn't have thought this would be
> difficult:
>
> WHERE TO_CHAR(now(), 'HH24MI') = TO_CHAR(time_column, 'HH24MI')

Use date_trunc

where date_trunc('minute',timefield)=date_trunc('minute',now());

I might have the args backwards.

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

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: TIME column manipulation/comparison hangups
Следующее
От: Alan Hodgson
Дата:
Сообщение: Re: Debugging infrequent pegged out CPU usage