From: | "Amitanand Chikorde" <amit99rs(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | EPOCH TIMESTAMP Conversion Problem |
Date: | 2007-11-07 10:37:05 |
Message-ID: | 7e7750290711070237x7da14616i383ace7f513f0882@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
hi all,
I have a table 'myTable'.
There is an attribute in the table as,
Column | Type | Modifiers
-----------------+-----------------------------+-----------
mydate | timestamp without time zone | not null
I want to convert MAX(mydate) from myTable to Epoch.
SELECT EXTRACT(EPOCH FROM TIMESTAMP WITHOUT TIME ZONE '2007-11-01
17:42:01.81693') ::int4;
How the above query can be used to convert MAX(mydate) to EPoch value?
Is there any other query that I can use?
I think it is not worth to write a function/procedure to just replace
the value in a query?
Please HELP...................
Thanks in advance
--
Amitanand N. Chikorde.
Software Engineer
==================================
cat /dev/zero >/dev/null
==================================
From | Date | Subject | |
---|---|---|---|
Next Message | Philippe Lang | 2007-11-07 13:22:55 | Temporal databases |
Previous Message | Keith Carr | 2007-11-06 12:51:45 | Bitemporal - problem with correalated subquery? |