Hi Lucas,
Just nest or chain your casts as appropriate.
example=> select cast(cast(105471234 as abstime) as timestamp); timestamp
--------------------- 1973-05-05 13:33:54
(1 row)
Time: 1.81 ms
example=> select 105471234::abstime::timestamp; timestamp
--------------------- 1973-05-05 13:33:54
(1 row)
Time: 1.97 ms
Best,
Randall
On Monday, May 12, 2003, at 11:05 AM, Lucas Lain wrote:
> i really dont know how to do it ... i'm a newbie
> it is something like this?
>
> select cast(105471234 AS abstime) ...
>
> and then?
>
>
>
> On Fri, 9 May 2003 16:36:48 -0500
> Bruno Wolff III <bruno@wolff.to> wrote:
>
>> On Fri, May 09, 2003 at 18:05:45 -0300,
>> Lucas Lain <lainl@aconectarse.com> wrote:
>>>
>>> can anyone tell me how to convert an epoch date to timestamp format??
>>
>> If the epoch date is an integer with seconds since the unix epoch,
>> you can cast it to abstime and then to timestamp.
>>
>
>
> --
> Lucas Lain
> lainl@aconectarse.com
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo@postgresql.org)
>