SELECT DATEDIFF(day, GETDATE(), '2010-10-03');
or
SELECT DATEDIFF(day, GETDATE(), '2010-10-03 00:00:00.0000000');
Here the GETDATE() is the built-in function of the SQL SERVER which returns the Current Date Time.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment