Hello Friends!
In continuation to my previous blog about SQL Server 2016 newly introduced T-SQL Functions, putting down DATEDIFF_BIG another the new function. This function helps to find difference between two dates in the units specified by the DatePart parameter and the returned unit is of type bigint. This function like DATEDIFF function returns the number of the specified datepart boundaries crossed between the specified startdate and enddate. The difference between these two functions is the return type. DATEDIFF functions return type is INT, whereas the DATEDIFF_BIG functions return type is BIGINT.
Syntax:
DATEDIFF_BIG ( datepart , startdate , enddate )
BIGINT range is from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
Think about DATEDIFF, any difference in Micro & Nano second is out of the the above range, DATEDIFF returns a value or an error.
With the help of extended range, you can now calculate date different up to milliseconds & nano seconds, however that makes me really worried. Why someone or an application would seek difference in milliseconds or nano seconds until rock science comes into picture.