Re: Hopefully simple date conversion question

Поиск
Список
Период
Сортировка
От Jason C. Pion
Тема Re: Hopefully simple date conversion question
Дата
Msg-id Pine.LNX.4.21.0007291145080.18466-100000@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Hopefully simple date conversion question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, 28 Jul 2000, Tom Lane wrote:

>   * convert the value to Unix timestamp notation (subtract off enough
>     days to make 0 correspond to 1/1/1970, then multiply by 24*60*60).
>   * coerce the resulting integer to abstime and then to whatever
>     datatype you want to use (timestamp or date, likely).

This worked perfectly.  Thanks very much for the help.

> This will not work if you have any dates before about 1900, however,
> since the Unix timestamp value would underflow.

No problem there.  Thankfully, none of the dates go that far back.

>             regards, tom lane

Thanks again for all the work on PostgreSQL.

Jason


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

Предыдущее
От: dave
Дата:
Сообщение: problem compiling php for pgsql
Следующее
От:
Дата:
Сообщение: select question