makeitwork09
Technical User
I am using SQL 2005.
I have found how to get the last day of the year for a given date.
I am trying to figure out how to, for a given date, get the end of the year for that same day. For example if the date provided is 01/10/2013, I want to return 12/10/2013.
Thanks
I have found how to get the last day of the year for a given date.
Code:
select dateadd(year,datediff(year,0,getdate())+1,-1)
I am trying to figure out how to, for a given date, get the end of the year for that same day. For example if the date provided is 01/10/2013, I want to return 12/10/2013.
Thanks