any additional date_time functions?

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: any additional date_time functions?
Date: 2006-06-17 20:08:20
Message-ID: 20060617200820.83165.qmail@web31805.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am working with the date_trunc() function with great success especially in the group by clause
for aggregates.

However, it is limited to returning "WHOLE" time units. i.e. years, months, days, hours, minutes,
seconds.

Are there any functions similar to date_trunc that can return variable increments i.e.:

5, 10, or 15 minutes increments,
3, 4, 6 hour increments,
1, 2 weekly increments,

I imagine that the returned values would have to either be the "floor" or "ceiling" of the actual
time stamps.

Regards,

Richard Broersma Jr.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ash Grove 2006-06-17 22:24:25 Re: concurrency problem
Previous Message Daniel CAUNE 2006-06-17 15:16:13 Re: keeping last 30 entries of a log table