Monday, July 11, 2011

Return last date of the current month using sql

SELECT datepart(dd,DateAdd(day, -1, DateAdd(month, DateDiff(month, 0, getdate())+1, 0))) AS Dateval

No comments:

Post a Comment