Oct 09, 2012 12:22 PM|Metaferia|LINK
Here is the code i currently use, it worked fine till this month. The code is supposed to return result of
But I now relized it's not showing January 2013 data, I guess i need to add some kind of year checker so if current year + 3 is more than 12 then use current year + 1. But i'm not sure how i can inlucde that condition in SQL.
SELECT * FROM [xxxx] where sent like '%U%' and Month(dateofservice) = (Month(GetDate())+3)AND Year(dateofservice) = Year(GetDate()) ORDER BY [dateofservice] DESC
Any tip will be appriciated