Re: Rounding datetimes - Mailing list pgsql-general

From Peter Childs
Subject Re: Rounding datetimes
Date
Msg-id a2de01dd0705221020u676a867t3863a7af36d3dfd0@mail.gmail.com
Whole thread Raw
In response to Rounding datetimes  (jws <jsacksteder@gmail.com>)
List pgsql-general


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/interactive/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC

Peter Childs

pgsql-general by date:

Previous
From: sudhir
Date:
Subject: Re: Lock table, Select for update and Serialization error
Next
From: Steve Crawford
Date:
Subject: Re: Rounding datetimes