declare @dayofmonth int
set @dayofmonth = 31
select dateadd(day, @dayofmonth - datepart(day, getdate()), cast(getdate() as date))
Open in new window
Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!
Author Closing Comment
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.
Join & Ask a Question
Join our community for more solutions or to ask questions.
For immediate help use Live now!