Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Adding to Time in Date fields

Re: Adding to Time in Date fields

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1996/12/03
Message-ID: <582aui$rcl@shadow.CSUFresno.EDU>#1/1

In article <32A440DF.3F1_at_popmail.med.nyu.edu>, 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"

Please use the new newsgroups: comp.databases.oracle.misc or comp.databases.oracle.tools. You shouldn't be using comp.databases.oracle anymore.

Look up Date Arithmetic in the Oracle SQL Language Reference Manual. All you need to do to add 20 minutes is

   date_column := date_column+(20/1440);

Steve Cosner Received on Tue Dec 03 1996 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US