Re: Timestamp comparison with string in some special cases

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Timestamp comparison with string in some special cases
Дата
Msg-id 20071119161502.GN1955@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Timestamp comparison with string in some special cases  (Dragan Matic <mlists@panforma.co.yu>)
Ответы Re: Timestamp comparison with string in some special cases
Список pgsql-general
On Mon, Nov 19, 2007 at 04:52:10PM +0100, Dragan Matic wrote:
> select * from table where timestamp_column < '11/19/2007 15:46:09 PM'

Maybe the to_timestamp() function would help you:

  SELECT to_timestamp('11/19/2007 15:46:09 PM','MM/DD/YYYY HH24:MI:SS')
    -> 2007-11-19 15:46:09+00

That just ignores the AM/PM flag, which may or may not be what you want
to do.


  Sam

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

Предыдущее
От: "Ian Barwick"
Дата:
Сообщение: Re: IP addresses
Следующее
От: "Josh Harrison"
Дата:
Сообщение: Postgresql storage question