pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Bruno Wolff III <bruno@wolff.to>
Cc: pgsql-sql@postgresql.org
Subject: Re: any additional date_time functions?
Date: Sun, 18 Jun 2006 08:28:46 -0700 (PDT)
Message-ID: <20060618152846.49958.qmail@web31806.mail.mud.yahoo.com> (raw)
In-Reply-To: <20060618095450.GA29167@wolff.to>

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



view thread (3+ messages)

Message-ID: <20060618152846.49958.qmail@web31806.mail.mud.yahoo.com>
Permalink:  ../20060618152846.49958.qmail@web31806.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20060618152846.49958.qmail@web31806.mail.mud.yahoo.com

 · 

reply

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: rabroersma@yahoo.com, bruno@wolff.to
  Subject: Re: any additional date_time functions?
  In-Reply-To: <20060618152846.49958.qmail@web31806.mail.mud.yahoo.com>

* 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