Thread: Unixtime from timedate?

Unixtime from timedate?

From
elwood@agouros.de (Konstantinos Agouros)
Date:
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

Re: Unixtime from timedate?

From
Palle Girgensohn
Date:
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