Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to add seconds to a DATE ?
Penalva Jean-Christophe wrote:
>
> Hello,
>
> i have a colum of DATE type. I'd like to add to this column a value in
> seconds for example.
>
> I know it's a so silly question, but perhaps i'm silly ??!! :-)
>
> PLEASE HELP ME.
>
> mailto:jean-christophe.penalva_at_cnusc.fr
If you want to add n seconds to a date field then
newdate = olddate + n/(24*60*60)
to add n minutes
newdate = olddate + n/(24*60)
to add n hours
newdate = olddate + n/24
and you've probably figured it out by now but to add n days
newdate = olddate + n
Cheers,
Ed
Ed Received on Thu Jan 15 1998 - 00:00:00 CST