sqlmaverick
Default port
Points: 1462
More actions
July 28, 2011 at 3:25 pm
#242227
Can i have a logic to get start date or first date of the next month by using getdate(). Please...
Ninja's_RGR'us
SSC Guru
Points: 294069
July 28, 2011 at 3:35 pm
#1360478
--Add 1 month, add 1 - day of month (puts you on the first of the month) ... to today's date without the time part
SELECT DATEADD(M, 1, DATEADD(D, 1 - DATEPART(D, GETDATE()), DATEDIFF(D, 0, GETDATE())))
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply