From: Mathieu Arnold <mat@mat.cc>
To: email lists <lists@darrenmackay.com>
To: pgsql-sql@postgresql.org
Subject: Re: date_trunc for 5 minutes intervals
Date: Sun, 19 Oct 2003 23:00:03 +0200
Message-ID: <614747984.1066604403@sauron.in.mat.cc> (raw)
In-Reply-To: <035C9F7CE28601428BBB5B051C9F77F20766F4@orion.mackay.local>
References: <035C9F7CE28601428BBB5B051C9F77F20766F4@orion.mackay.local>
+-Le 19/10/2003 23:38 +1000, email lists écrivait :
| Hi All,
|
| I am wanting to perform the equivalent of date_trunc to 5/10/15 minute
| intervals. As this does mnot seem to be natively supported by
| date_trunc, can anyone point me in the right direction to possible write
| the SQL ro achieve the desired outcome?
maybe (date_part(epoch, field)::integer / 300 * 300)::timetamp for 5
minutes interval...
--
Mathieu Arnold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mat@mat.cc, lists@darrenmackay.com
Subject: Re: date_trunc for 5 minutes intervals
In-Reply-To: <614747984.1066604403@sauron.in.mat.cc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox