Calculating the Difference between two Dates in Hours.

Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 408
If we want to find out the difference in terms on minutes,then just divide the above result by 3600.

SELECT (UNIX_TIMESTAMP(dt2) - UNIX_TIMESTAMP(dt1))/3600 from table_name;

Comments or Responses

Login to post response