Thread: postgres and unix time format

postgres and unix time format

From
Ryan Mahoney
Date:
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

From
"Richard Huxton"
Date:
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.