Click here to Subscribe to IT PORT Channel :
Returns the count (signed integer) of the specified datepart boundaries crossed between the specified startdate and enddate
We can get Date, Month, Year, hour, Minutes, Seconds, MilliSeconds, Microseconds, NanoSeconds difference by using this DATEDIFF function.
DATEDIFF can be used in the select list, WHERE, HAVING, GROUP BY and ORDER BY clauses.DATEDIFF implicitly casts string literals as a datetime2 type. This means that DATEDIFF does not support the format YDM when the date is passed as a string
Xem thêm bài viết: https://noviway.com/category/cong-nghe