Re: Re: Incrementing a date type.
| От | will trillich |
|---|---|
| Тема | Re: Re: Incrementing a date type. |
| Дата | |
| Msg-id | 20010602071129.E28201@serensoft.com обсуждение исходный текст |
| Ответ на | Re: Incrementing a date type. (Bruno Wolff III <bruno@wolff.to>) |
| Список | pgsql-general |
On Wed, May 23, 2001 at 08:59:00AM -0500, Bruno Wolff III wrote:
> On Fri, May 18, 2001 at 12:17:47PM -0500,
> DC <danc@bspmail.com> wrote:
> > I have an event that is three days long. In a table I want to be able to
> > enter Friday date and have Saturdays and Sundays fill in automatically. It
> > also has to check for the month/# of days in...
>
> You can add intervals to timestamps. If you use an interval of 1 day, this will
> probably do what you want.
for example --
select 'april 19, 2001'::date + interval('2 week');
or, just for confusion,
select date('april 19, 2001') + '2 week'::interval;
check the docs on what keywords are acceptable intervals. it's
wonderful.
--
#95: We are waking up and linking to each other. We are watching. But
we are not waiting. -- www.cluetrain.com
will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!
В списке pgsql-general по дате отправления: