Hello all,
I would like to know how I can find out the hour/second/minute difference of two dates in SQL. In addition, are there any SQL functions to convert a date into unix time?
Joe
Printable View
Hello all,
I would like to know how I can find out the hour/second/minute difference of two dates in SQL. In addition, are there any SQL functions to convert a date into unix time?
Joe
(date1-date2)*24*60*60 will give you the difference in seconds. From this number you can find the hours and minutes by doing some division and modulus operations.
Thanks.
Syed