Unixtime from timedate?

Started by Konstantinos Agourosover 24 years ago2 messagesgeneral
Jump to latest
#1Konstantinos Agouros
elwood@agouros.de

Hi,

I might be missing something in the documentation but what I would need is
the time in seconds since 1970 from a datetime-column in a table (in Perl using
DBD:Pg). Could someone help me without using Posix::mktime?

Konstantin
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres

#2Palle Girgensohn
girgen@partitur.se
In reply to: Konstantinos Agouros (#1)
Re: Unixtime from timedate?

Konstantinos Agouros wrote:

Hi,

I might be missing something in the documentation but what I would need is
the time in seconds since 1970 from a datetime-column in a table (in Perl using
DBD:Pg). Could someone help me without using Posix::mktime?

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

/Palle

--
Palle Girgensohn

Partitur Informationsteknik AB
http://www.partitur.se/partitur/visitkort/girgensohn.jpg