Обсуждение: postgres and unix time format

Поиск
Список
Период
Сортировка

postgres and unix time format

От
Ryan Mahoney
Дата:
Is it possible to select dates from postgres in Unix time format?

Thanks!

-Ryan Mahoney
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.251 / Virus Database: 124 - Release Date: 4/26/01

Re: postgres and unix time format

От
"Richard Huxton"
Дата:
From: "Ryan Mahoney" <ryan@paymentalliance.net>

> Is it possible to select dates from postgres in Unix time format?

Something like:

select extract('epoch' from now());

or

select date_part('epoch',now());

should do it.