May I ask how can I get data from previous month? I have Final_ClockIn field which server as my date. Our client execute this scipt every first of the month. So let say, january 2019, how can I get data from december 2018? This needs to be consistent everymonth.
This is what I have and I believe not correct : MONTH(Final_ClockIn) = DATEADD(MONTH,DATEDIFF(MONTH,0,GETDATE()) -1,0) AND YEAR(Final_ClockIn) = YEAR(getdate())
All I can see is for MySQL samples only. Thank you