Monday, August 5, 2013

how to get the last day of a month in sql

To get the last day of a month in sql

SELECT DATEADD(MS,- 3,DATEADD(M,0,DATEADD(M,DATEDIFF(M,0,GETDATE())+1,0))) 'Last Day'

No comments:

Post a Comment