See DATEDIFF_BIG (Transact-SQL) for a function that handles larger differences between the startdate and enddate values. See Date and Time Data Types and Functions (Transact-SQL) for an overview of all Transact-
If the start and end dates are equal or fall within the same interval, the function returns zero.SSIS Expression ExamplesThis example calculates the number of days between two date literals. If the date is in "mm/dd/yyyy" format, the function returns 7....
Applies to: SQL Server 2016 (13.x) and later Azure SQL Database Azure SQL Managed InstanceThis function returns the count (as a signed big integer value) of the specified datepart boundaries crossed between the specified startdate and enddate.See...