Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i need to get the diff between two dates
Ex:- startdate(30/10/2012) enddate(11/01/2012)

Output= 19/09/2012 and also total days of result date.

Thanks in Advance

Sucharitha
Posted

Try DATEDIFF[^]:
SQL
SELECT DATEDIFF(day, '2011-01-01', '2011-02-01')
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900