views:

311

answers:

1

At the moment I use DATEPART(yy, MY_DATE) = DATEPART(yy, GETDATE()) to get Year-To-Date details and have to convert it into the revolving last 12 months. How would I do that?

+4  A: 

You can do date arithmetic with dateadd, e.g. where MY_DATE > dateadd (yy, -1, getdate())

ConcernedOfTunbridgeWells
This is exactly what I was going to put.
Garry Shutler
Thanx a million!
Greg