I have a database which contains two dates which I am concerned with.
StartDate + EndDate
These dates are stored in the following format:
2008-06-23 00:00:00.000
I need to add a piece of dynamic SQL to only bring back dates which fall in the current financial year.
so for example 01/04/2011 - 31/03/2012 would be this financial year.
Therfore any record whos enddate is within these dates, or is NULL is classed as 'active'
The year part will need to be dynamic so that as soon as it hits 1st April 2012 we move into the new financial year and will be bringing data back from 01/04/2012 - 31/03/13 and so on.
Can suggest some code or point out any rules I have overlooked?