Good morning!
I am using the command below and the result returned is 6. In fact, observing the dates well, it has not closed exactly the 6 months, I think that through this function days are not being considered, and this is causing me a problem. Would it have any way of returning in this case only the integer 5 or with the same decimal, 5,8 for example?
SELECT CONVERT(VARCHAR(10), GETDATE(), 112), '20180222', DATEDIFF(MM, '20180222', CONVERT(VARCHAR(10), GETDATE(), 112))
20180817 20180222 6