Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 28 Oct 2010 at 3:29am
I am guessing that you are using the month function of DATEDIFF. It will calculate by just looking at the date, 10/24/10 - 1/1/10...10-1=9.
The solution is use the day function, and then divide by some value (average days in a month) to get the months (approximate) or use DAY() to the the day values and subtract them and then use some cutoff value to determine if you need to 'round up' to the next month (also approximate, but probably closer to what you are looking for)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum