I am currently using DATEPART (yy, MY_DATE) = DATEPART (yy, GETDATE ()) to retrieve data one year before the date and must convert it to the number of revolutions of the last 12 months. How can I do it?
You can do date arithmetic with dateadd, for example. where MY_DATE > dateadd (yy, -1, getdate())
where MY_DATE > dateadd (yy, -1, getdate())
Source: https://habr.com/ru/post/1711326/More articles:Access text box from jQuery - javascriptСоздание прокси-сервера Proxy/Stub в VS 2008 - visual-studio-2008Several methods or parameters? - methodsHow can I change the Div style to Mousedown ?, or any other event for that matter ... - javascriptGoogle Charts Tutorial - google-app-engineWhat are the basic concepts that all programmers should learn and use? - methodologySetting author field in SPListItem will not be saved - copyopen source training - searchПроверка валидности - javascriptiPhone SDK Push Notification - iphoneAll Articles