I know that SQL Server's DATEDIFF
will calculate the difference between two datetime
values in a chosen unit - hours, days, etc.
But I want to get the difference between two datetime
values more like .Net's DateTimeOffset
e.g. more like a date format: years, months, days, hours, minutes.
I don't know if SQL Server 2016 has any equivalent type, or built in functions to do this? Or would I have to roll some custom logic?