Skip to content
Advertisement

How can force SQL DateDiff function to stop rounding up?

I am working on a query that tries to count from an exact date to an exact date. Today is 2/16/2022. Between 6/30/2020 and 2/16/2022 19 months have gone by. My DateDiff query returns 20? How can I force DateDiff function to return 19?

Advertisement

Answer

Here is the solution that worked for me.

link to fiddle

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement