Calculate Difference between two Dates in Days.

Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 624
If we want to find out the difference in terms on Days,just divide the above result by 3600*24

SELECT (UNIX_TIMESTAMP('2013-11-09 00:00:00') - 
UNIX_TIMESTAMP('2012-10-07 00:00:00'))/(3600*24) from table_name;

Comments or Responses

Login to post response