I have a table in which joining dates are give in datetime format.
I have to calculate how many employees joined each financial year resp. ie for eg from
1-04-2002 to 31-03-2003.this should work for each year..from 2003 to 2004,2004 to 2005…n so on.
can anybdy help?
thanxx.
You can map start date to financial year using
YEAR(DATEADD(M,-3,JoinDate)I think and you can count records with a CTE, e.g.