Re: day_trunc and day duration in a remote time zone - Mailing list pgsql-general

From Adrian Klaver
Subject Re: day_trunc and day duration in a remote time zone
Date
Msg-id 52601764.6080800@gmail.com
Whole thread Raw
In response to day_trunc and day duration in a remote time zone  (Marc Mamin <M.Mamin@intershop.de>)
List pgsql-general
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@gmail.com


pgsql-general by date:

Previous
From: Oscar Calderon
Date:
Subject: Strange results with pg_restore
Next
From: David Kerr
Date:
Subject: Re: PostgreSQL vs Mongo