I'm glad its not just me thats having a bad morning making the numbers work...

My understanding of it goes something like this:

When working with date/times, oracle considers 1 to mean "One day".

There are 24 hours in every day, so to get the figure for one hour you use 1/24
eg sysdate - 1/24 would give you the time one hour ago.

There are 60 minutes in each hour, so one minute is 1/(24*60) Which is 24 hours
times 60 minutes

Similarly, if you wanted seconds there are 60 in each minute, so 1 second is
1/(24*60*60)
Thats one day divided by (number of hours in a day * number of minutes in an
hour * number of seconds in a minute)

You can probably do the same thing with decimals, but the numbers are messy.  If
Oracle handled anything smaller than a second, we'd probably start seeing issues
with rounding errors...

Hope thats clear and I haven't made any obvious mistakes.

Simon Anderson

-----Original Message-----
Sent: Thursday, April 11, 2002 14:08
To: Multiple recipients of list ORACLE-L


I want to subtract a  minute from a date/time

How can I do this?

John
--


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to