How many days does a year have in your scenario?
same question for month...
Your example could also result in 1 year 0 month 30 days (assuming a year with February 29th) or 1 year 1 month 3 days (counting 396 days from Feb. 1st 2009) when based on "real" calendar.
Depending on the requirement (example: 30 day per month, 12 month per year = 360 days per year) you could use something like
SELECT (DATEDIFF(day,@field1,@field2)/360)
SELECT (DATEDIFF(day,@field1,@field2)/30)%12
SELECT DATEDIFF(day,@field1,@field2)%30
Edit: SQL code modified.
Edit2: question in general: Why don't you format the date on the presentation layer? That's usually the better way to do it...
Lutz
A pessimist is an optimist with experience.
How to get fast answers to your question[/url]
How to post performance related questions[/url]
Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]