I have this situation:
Start date = 11/1/2007
End date = 2/28/2008
I have to organize date to determine which year of transaction they fall in. For example using above date, this record should fall in YEAR 1 as only 3 months have passed. If End date is 11/2/2008, it should fall in year 2. However, if I use DATEDIFF(yy,Sta rt date, End date) function it returns 1 for both records. How can I determine which year my record belongs to? I need to do this to organize data from 12 years.
Thanks much!!
Aamir.
Start date = 11/1/2007
End date = 2/28/2008
I have to organize date to determine which year of transaction they fall in. For example using above date, this record should fall in YEAR 1 as only 3 months have passed. If End date is 11/2/2008, it should fall in year 2. However, if I use DATEDIFF(yy,Sta rt date, End date) function it returns 1 for both records. How can I determine which year my record belongs to? I need to do this to organize data from 12 years.
Thanks much!!
Aamir.
Comment