Re: Syntax for converting double to a timestamp

From: Alban Hertroys <alban(at)magproductions(dot)nl>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, Frank Church <voipfc(at)googlemail(dot)com>
Subject: Re: Syntax for converting double to a timestamp
Date: 2006-09-04 08:58:20
Message-ID: 44FBEAAC.5010908@magproductions.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Eisentraut wrote:
> Frank Church wrote:
>> error: cannot cast tupe double precision to timestamp without time
>> zone
>>
>> What is the right syntax?
>
> 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'

--
Alban Hertroys
alban(at)magproductions(dot)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 //

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2006-09-04 09:04:23 Re: Syntax for converting double to a timestamp
Previous Message Ben Trewern 2006-09-04 08:14:08 Re: pgFoundry.org not working!