Re: help: adding an hour to a DATE datatype...

From: C.J. Jardine <cj10_at_cam.ac.uk>
Date: 1995/09/26
Message-ID: <4495mu$5qu_at_lyra.csx.cam.ac.uk>#1/1


Craig Neal <coneal_at_saturn.otago.ac.nz> wrote:
>This is an easy question, but I just can't quite figure out how to do it
>exactly, i.e. how do you add n hours to a date datatype in SQL*Plus. Any
>help would be greatly appreciated,

UPDATE mytable SET mydate = mydate + n/24 WHERE ... ;

You can ad a number to a date. The number is in days, so 1/24 is an hour.

Charles Jardine, Univ of Cambirdge (UK). Received on Tue Sep 26 1995 - 00:00:00 CET

Original text of this message