65.9K
CodeProject is changing. Read more.
Home

SQL Get the last date of the month

starIconstarIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIcon

2.60/5 (3 votes)

Sep 8, 2009

CPOL
viewsIcon

13141

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))