Re: timestamp- milliseconds since epoch output

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: timestamp- milliseconds since epoch output
Дата
Msg-id 26381.981503837@sss.pgh.pa.us
обсуждение исходный текст
Ответ на timestamp- milliseconds since epoch output  (jkakar@expressus.com)
Список pgsql-sql
jkakar@expressus.com writes:
> I've tried using variations of to_char and to_timestamp but can't seem
> to get the timestamp as a value of milliseconds since the Epoch (Jan
> 1, 1970).

regression=# select date_part('epoch','2001-02-05 17:23:26.123456-08'::timestamp);   date_part
------------------981422606.123456
(1 row)

Multiply by 1000 if you feel a strong urge to have it in milliseconds...
        regards, tom lane


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

Предыдущее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: Re: SQL Join - MySQL/PostgreSQL difference?
Следующее
От: Christopher Sawtell
Дата:
Сообщение: Re: Postgres-HOWTO