Re: [LIP] Postgres quickie...
Devdas Bhagat <devdas-B/gC27/pXbteH41UXmfQsti2O/[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <20060428180730.GA7314@dvb> |
On 28/04/06 19:24 +0200, Binand Sethumadhavan wrote:
> Hi,
>
> I can do:
>
> template1=# select extract (epoch from timestamp 'Mar 31 23:59:59 2006');
> date_part
> ------------
> 1143845999
> (1 row)
>
> How do I do the reverse? ie, given the number 1143845999, how do I get
> the string "Mar 31 23:59:59 2006"?
>
test=# SELECT to_char('1970-01-01 00:00:00+0000'::timestamptz + 1143845999*'1
second'::interval, 'Mon DD HH:MI:SS YYYY') as mydate;
Devdas Bhagat
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642