Re: date_trunc for 5 minutes intervals

From: Mathieu Arnold <mat(at)mat(dot)cc>
To: email lists <lists(at)darrenmackay(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: date_trunc for 5 minutes intervals
Date: 2003-10-19 21:00:03
Message-ID: 614747984.1066604403@sauron.in.mat.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

+-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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message George A.J 2003-10-20 02:57:41 Which is faster SQL or PL/PGSQL
Previous Message Adaś 2003-10-19 16:56:10 problem with sql