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

From: Louise Miller <miller_at_louise.ucsd.edu>
Date: 1995/09/29
Message-ID: <1995Sep29.215859.21458_at_nosc.mil>#1/1


Well, this may sound odd, but there is a built-in function called "new_time" that allows you to change time zones. I put it in a database trigger to compensate for our server that thinks it's in Greenwich England. (They tell me it's a SQL*NET bug.)

You could use that to add an hour by choosing 2 timezones that are next to each other.

 :NEW.MY_TIME := to_char(new_time(sysdate, 'PST', 'MST'),'HH24:MI:SS');

Takes the current time and adds one hour. It will compensate for the date rollover. (Aren't you glad? Date rolling routines are not fun.)

Hope that helps. Received on Fri Sep 29 1995 - 00:00:00 CET

Original text of this message