Search Postgresql Archives

Re: conversion from epoch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/30/2012 07:36 AM, Little, Douglas wrote:
I have an input source that is in epoch time.    Is there a built-in
conversion to changing to timestamp

http://www.postgresql.org/docs/9.1/interactive/functions-formatting.html
"
to_timestamp(double precision) timestamp with time zone convert Unix epoch to time stamp to_timestamp(1284352323)
"

So:

test=> SELECT to_timestamp(extract(epoch from now()));
         to_timestamp
-------------------------------
 2012-07-30 15:51:42.587106-07



Thanks

*Doug Little*



--
Adrian Klaver
adrian.klaver@xxxxxxxxx

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux