Re: Inputting relative datetimes - Mailing list pgsql-hackers

From Vik Reykja
Subject Re: Inputting relative datetimes
Date
Msg-id CALDgxVvWBh+NGDpCf2PjaZGG-G9CYUPagO62tubMGitjeJBa9Q@mail.gmail.com
Whole thread
In response to Inputting relative datetimes  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: Inputting relative datetimes
List pgsql-hackers
On Thu, Aug 25, 2011 at 11:39, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
My first thought was to have some general way of adding or subtracting
an interval at the end of an input timestamp, eg. by adding another
couple of special values - "plus <interval>" and "minus <interval>".
This would allow things like:

TIMESTAMPTZ 'today minus 5 days'
TIMESTAMPTZ 'now plus 2 hours'

Funny you should mention intervals...

timestamptz 'today' - interval '5 days'
timestamptz 'now' + interval '2 hours'

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Inputting relative datetimes
Next
From: Dean Rasheed
Date:
Subject: Re: Inputting relative datetimes