Search Postgresql Archives

Re: Syntax for converting double to a timestamp

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

 




On Sep 4, 2006, at 17:58 , Alban Hertroys wrote:

Peter Eisentraut wrote:
It's not clear what the meaning of a double precision as a timestamp would be. How about you make that explicit:
"timestamp" * interval '1 second' + timestamp '1900-01-01 00:00:00'

There's also 'EPOCH', which is shorter and more explicit.

timestamp 'EPOCH" + "timestamp" * interval '1 second'

Note that epoch does not mean 1900-01-01 00:00:00.

select timestamp 'epoch';
      timestamp
---------------------
1970-01-01 00:00:00
(1 row)

Michael Glaesemann
grzm seespotcode net




[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