Re: Adding seconds to a time
От | Jean-Yves F. Barbier |
---|---|
Тема | Re: Adding seconds to a time |
Дата | |
Msg-id | 20100915154642.7475a465@anubis.defcon1 обсуждение исходный текст |
Ответ на | Re: Adding seconds to a time ("Rob Richardson" <Rob.Richardson@rad-con.com>) |
Ответы |
Re: Adding seconds to a time
|
Список | pgsql-novice |
On Wed, 15 Sep 2010 09:20:04 -0400, "Rob Richardson" <Rob.Richardson@rad-con.com> wrote: Be careful though, there might be a '+1x' shift: SELECT now(); => 2010-09-15 15:39:02.838245+02 see: SELECT now() + '1 month'::interval; => 2010-10-15 15:39:27.518034+02 I guess that is an SQL rule, but it is not "legally" correct, when you calculate a contract termination date for example (which should be 2010-10-14.) > And, of course, as soon as I post the question I find the answer, > through a more intelligent search: > > Multiply the number by a standard interval: > select N * '1 second'::interval > > RobR > -- I tried the clone syscall on me, but it didn't work. -- Mike Neuffer trying to fix a serious time problem
В списке pgsql-novice по дате отправления: