To find the difference between two dates.
SELECT DATEDIFF(DAY, '4/29/2019', '6/14/2019');
result : 46
SELECT DATEDIFF(DAY, '5/09/2019', '6/14/2019');
Result: 36
SELECT DATEDIFF(DAY, '4/29/2019', SYSDATETIME());
Result: 78
SELECT DATEDIFF(DAY, '4/29/2019', '6/14/2019');
result : 46
SELECT DATEDIFF(DAY, '5/09/2019', '6/14/2019');
Result: 36
SELECT DATEDIFF(DAY, '4/29/2019', SYSDATETIME());
Result: 78
No comments:
Post a Comment