Re: Syntax for converting double to a timestamp - Mailing list pgsql-general

From Frank Church
Subject Re: Syntax for converting double to a timestamp
Date
Msg-id 84b7c6460609041110p4cd0ebfds263e0d87a702cb38@mail.gmail.com
Whole thread Raw
In response to Re: Syntax for converting double to a timestamp  (Alban Hertroys <alban@magproductions.nl>)
List pgsql-general
On 9/4/06, Alban Hertroys <alban@magproductions.nl> wrote:
> Michael Glaesemann wrote:
> > Note that epoch does not mean 1900-01-01 00:00:00.
>


 select *, timestamp 'EPOCH' + "timestamp" * interval '1 second' as
tstamp from ccmanager_log where id > 15400

 select *, timestamp '1900-01-01 00:00:00' + "timestamp"  * (interval
'1 second') from ccmanager_log where id > 15400

I tried both of these and the worked - but them timestamp '1900-01-01
00:00:00'  gives dates that are 70 years of so it should be
'1970-01-01 00:00:00'


The sheer guruhood of PostgreSQL users is amazing.

Which topics in the manual discusses these issues in depth?

> Indeed! Where did this 1900 sneak in? Aren't timestamps usually based on
> epoch?
>
> --
> Alban Hertroys
> alban@magproductions.nl
>
> magproductions b.v.
>
> T: ++31(0)534346874
> F: ++31(0)534346876
> M:
> I: www.magproductions.nl
> A: Postbus 416
>     7500 AK Enschede
>
> // Integrate Your World //
>

pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Tsearch2 & Hebrew
Next
From: "Christopher Murtagh"
Date:
Subject: Re: Array comparison - subset