Search Postgresql Archives

Re: day_trunc and day duration in a remote time zone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/17/2013 08:47 AM, Marc Mamin wrote:
Hello,
I want to retrieve the day start and duration of an epoch  within a
given time zone
and return the day start as epoch.


Not quite sure what you are looking for, but something like:

hplc=> select current_date::timestamp, extract(epoch from current_date::timestamp);

      timestamp      | date_part
---------------------+------------
 2013-10-17 00:00:00 | 1381968000


regards,
Marc Mamin


--
Adrian Klaver
adrian.klaver@xxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux