View Single Post

   
  #2 (permalink)  
Old 04-09-2008, 05:22 PM
Peter Childs
 
Posts: n/a
Default Re: Rounding datetimes

On 22 May 2007 10:08:24 -0700, jws <jsacksteder@gmail.com> wrote:
>
> Is there a way to round an interval to the nearest minute or do I need
> to create a function for this?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>


date_trunc('minute',interval)

see

http://www.postgresql.org/docs/8.2/i...DATETIME-TRUNC

Peter Childs

Reply With Quote