Possibly a bad attempt at solving this on my tablet. There has to be a cleverer way to do it lol give it a go anyway
If datepart(mm, your-date) >7
then cast('31/12/' + cast(datepart(yy, dateadd(yy, 4, your-date)) as char(4)) as datetime)
tested it this morning - original solution doesn't work lol but here is one that does:
declare @somedate datetime
set @somedate = '2012-08-01'
If datepart(mm, @somedate) >7 select cast('12/31/' + cast(datepart(yy, dateadd(yy, 4, @somedate)) as char(4)) as datetime) else select @somedate
set @somedate = '2013-01-01'
If datepart(mm, @somedate) >7 select cast('12/31/' + cast(datepart(yy, dateadd(yy, 4, @somedate)) as char(4)) as datetime) else select @somedate
---------------------------------------------------------
It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
David Edwards - Media lens[/url]
Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
Howard Zinn