Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: time calc from date, sysdate & number fields
Example with:
date field = 09-12-2000 12:00
quota = 40.25 hours
Results are in seconds:
v734>select sysdate,
2 (sysdate-to_date('09-12-2000 12:00', 'MM-DD-YYYY HH24:MI')) 3 *86400 "Elapsed", 4 (40.25/24- 5 (sysdate-to_date('09-12-2000 12:00', 'MM-DD-YYYY HH24:MI'))) 6 *86400 "Quota left"
SYSDATE Elapsed Quota left ------------------- ---------- ---------- 09-13-2000 10:46 81984 62916
1 row selected.
-- Have a nice day Michel Glen Stromquist <glenstr_at_my-deja.com> a écrit dans le message : 8plrbl$23t$1_at_nnrp1.deja.com...Received on Wed Sep 13 2000 - 03:47:04 CDT
> I am trying to design a query that will take a date field in a table,
> subtract it from sysdate to show elapsed time, which will then be
> subtracted from a number field that has allowed hours & minutes in
> 99.99 format. (number (5,2))
>
> Any suggestions on how best to do this?
>
>
>
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.