Pages

To find the difference between two dates in SQL Server

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

No comments:

Post a Comment

Featured post

Snowflake - Creating warehouse in Snowflake

Creating warehouse Login to Snowflake and click on warehouse and click on Create fill the necessary details and click Finish We can also c...