Re: Storing Times in Oracle

From: Ian Gillman <igillman_at_ins.btg.com>
Date: 1996/10/04
Message-ID: <533531$jmr_at_romulus.isihq.net>#1/1


In article <3254538F.1CA4_at_dca.net>, jennings_at_dca.net says...
>
>Does this then provide any mechanism to get the difference between
>two times in hours & minutes?
>--
>~~~~~~~~~~~~~~~~~~~~~~~~~
>jennings_at_dca.net
I am not sure of the exact answer to this problem but a little trick I have used before could be modified to solve it. Basically when Oracle stores a date it does so as a floating point number with the integer part being the date and the floating point part being the time. So in order to set a date and a time I had to do the following (excuse any syntax errors but I do not have Oracle here to check it out and I am going from memory)...

next_time := SYSDATE + (3/24);

That would set next_time to be 3 hours from now. I also did...

next_time := SYSDATE + (15/1440);

That would set next_time to be 15 minutes from now.

As I said, this does not actually solve your problem but it may give you some clues as to how to go about it.

TTFN
Ian

igillman_at_ins.btg.com Received on Fri Oct 04 1996 - 00:00:00 CEST

Original text of this message