From: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
---|---|
To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: any additional date_time functions? |
Date: | 2006-06-18 15:28:46 |
Message-ID: | 20060618152846.49958.qmail@web31806.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> > 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,
> You might be able to extract the time since the epoch and divide it by the
> appropiate number of seconds (the length of your interval) and truncate
> the result. This might have unexpected results for you when you span
> daylight savings time changes.
>
> Another option is to not use timestamp, but rather just store an integer that
> represents some number of your intervals offset from an epoch.
Bruno,
Thanks for the suggestions. I am going to "toy" around with them to see what I can get to work.
Thanks for the help.
Regards,
Richard Broersma Jr.
From | Date | Subject | |
---|---|---|---|
Next Message | Aaron Bono | 2006-06-18 21:24:33 | Re: concurrency problem |
Previous Message | Sim Zacks | 2006-06-18 11:14:33 | join on next row |