Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / SQL

SQL Get the last date of the month

2.60/5 (3 votes)
7 Sep 2009CPOL 13.1K  
Select dateadd(day, -1, dateadd(month, 1, dateadd(day, 1 - day(@Date), @Date))
Select dateadd(day, -1, dateadd(month, 1, dateadd(day, 1 - day(@Date), @Date))

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)