Re: date calculation - Mailing list pgsql-sql

From Tomasz Myrta
Subject Re: date calculation
Date
Msg-id 3F45BB45.80704@klaster.net
Whole thread Raw
In response to date calculation  (MichaelHoeller@t-online.de)
Responses Re: date calculation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
> Hi there,
> 
> I have a problem calculating a date. A field carries the date as passed
> seconds since Jan 1st 1970.
> How can I get the date as dd.mm.yyyy out of this??

cast('1970-1-1' as timestamp)+cast(your_ticks || ' seconds' as interval)

Does anyone know better way to cast it?

Regards,
Tomasz Myrta



pgsql-sql by date:

Previous
From: Bertrand Petit
Date:
Subject: Re: "SELECT IN" Still Broken in 7.4b
Next
From: Rajesh Kumar Mallah
Date:
Subject: Joined deletes but one table being a subquery.