views:

322

answers:

2

Hi,

Which is the best way in Oracle 9i to get the difference between two dates including the times ? Something like the Timespan function in C#.

Thanks, Chak

+2  A: 

When you subtract two dates you get the difference in days. If you multiply that number by 24 you have the difference in hours. Multiply that number by 60 you have the difference in minutes, etc.

klausbyskov
+2  A: 

You can express the difference as a numeric number of days, or as an interval data type: http://download.oracle.com/docs/cd/B10501%5F01/server.920/a96540/expressions9a.htm#1033525

David Aldridge