Monday, August 5, 2013

how to get the last day of current year in sql server

To get the last day of current year using sql

SELECT DATEADD(MS,-3,DATEADD(YY,0,DATEADD(YY,DATEDIFF(YY,0,GETDATE())+1,0))) 'Year End'

No comments:

Post a Comment