Re: Inputting relative datetimes
От | Vik Reykja |
---|---|
Тема | Re: Inputting relative datetimes |
Дата | |
Msg-id | CALDgxVvWBh+NGDpCf2PjaZGG-G9CYUPagO62tubMGitjeJBa9Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Inputting relative datetimes (Dean Rasheed <dean.a.rasheed@gmail.com>) |
Ответы |
Re: Inputting relative datetimes
|
Список | pgsql-hackers |
On Thu, Aug 25, 2011 at 11:39, Dean Rasheed <span dir="ltr"><<a href="mailto:dean.a.rasheed@gmail.com">dean.a.rasheed@gmail.com</a>></span>wrote:<br /><div class="gmail_quote"><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">My first thought was to have some general way of adding or subtracting<br /> an interval at theend of an input timestamp, eg. by adding another<br /> couple of special values - "plus <interval>" and "minus <interval>".<br/> This would allow things like:<br /><br /> TIMESTAMPTZ 'today minus 5 days'<br /> TIMESTAMPTZ 'nowplus 2 hours'<br /></blockquote></div><br />Funny you should mention intervals...<br /><br />timestamptz 'today' - interval'5 days'<br />timestamptz 'now' + interval '2 hours'<br />
В списке pgsql-hackers по дате отправления: