Date Calculation [message #371337] |
Wed, 04 October 2000 14:04 |
Salman Khan
Messages: 51 Registered: September 2000
|
Member |
|
|
Hi,
Iam calculating dates like this
select to(sysdate) - to_date('03-oct-00') from dual
its return me 1 but I want this in Hours,
How can i do this
Any idea?
Thanks in advance
Salman Khan
|
|
|
|
Re: Date Calculation [message #371346 is a reply to message #371337] |
Thu, 05 October 2000 11:58 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
To get just the hours (and not fractions too) you can add a trunc() to the result, also - no need to perform a to_date(sysdate)
select trunc((sysdate - to_date('03-OCT-00'))*24) from dual;
|
|
|