/ Published in: SQL
One line to determine start of previous month
Expand |
Embed | Plain Text
declare @prevmonth datetime declare @numprevious int SET @numprevious = 2 SET @prevmonth = DATEADD(month, DATEDIFF(month,0,getdate())-@numprevious,0)
You need to login to post a comment.
