Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Adding to Time in Date fields
On Tue, 03 Dec 1996 11:01:54 -0400, Marc <marc_at_popmail.med.nyu.edu> wrote:
>I would like to add a certain number of minutes to
>a time value stored in an Oracle Date field.
>
>Is there an Oracle function to allow me to add the minutes
>to the field so that the other members of the Date field "day, hour,
>minutes" will reflect the change?
>
>So if I were to add 20 minutes to "December 2, 1996 12:50AM"
>the resulting Oracle field would be "December 3, 1996 1:10AM"
>
> Thanks,
> Marc Waldman
> marc_at_popmail.med.nyu.edu
Oracle date fields are in days, so to add 20 minutes
start_date := start_date + 20/1440;
(1440 minutes in a day)
Scott Moyer
dmoyer_at_gpu.com
Received on Tue Dec 03 1996 - 00:00:00 CST