Posts by Alexandre Vieira • 11 points
1 post
-
1
votes3
answers18734
viewsA: Calculate Difference between Dates in SQL Server, with Years, Months and Days output
I formatted a query to list the correct results, always considering the correct differences between months and days as well. DECLARE @DifDataIn as datetime, @DifDataFi as datetime SET @DifDataIn =…