RE: Difference of two date values in hours

RE: Difference of two date values in hours

 

  

SELECT call_complete_date - call_log_date days_difference
FROM user_log

Returns the difference in days. Multiply by 24 to get the difference in hours

SELECT (call_complete_date - call_log_date) * 24 hours_difference
FROM user_log

Justin Cave
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

-----Original Message-----
From: Mahesh Basarkar [mailto:[Email Address Removed]
Sent: Tuesday, March 30, 2004 11:54 PM
To: LazyDBA.com Discussion
Subject: Difference of two date values in hours

Hi all,

I want to have difference of two date columns in hours.

For example, I have a table USER_LOG

SQL> DESC USER_LOG
:
:
Call_Log_date DATE
Call_Complete_date DATE


I want difference of above two dates (type is date timestamp) in hours.


Thanks in advance.


_______________________
r e g / m a h e s h b a s a r k a r
Oracle LazyDBA home page