Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

j

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Financial Year Calculation

select (case when
datepart(mm,reqDate) between 7 and 12 then
datename(yy,reqDate) + '-' + datename(yy,dateadd(yy,1,reqDate))
else
datename(yy,dateadd(yy,-1,reqDate)) + '-' + datename(yy,reqDate)
end),
reqDate
from request
order by 1, 2
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS