asd987 write:
> Datediff() calculates in days, hours or minutes. Instead of "500 days" as
> result I want 1 year, .. months and .. days.
How many days are there in a year?
How many days are there in a month?
When you calculate years, months, days between two dates, the result may
vary depending on wether you start counting hole years, hole month and the
remaining days or you start counting days, then months, then years. The
result may vary depending on wether you start counting from the lowest date
to the highest date or vice versa.
How do you count the period from 2004-01-31 to 2004-02-29. Is it one month
or 29 days?
What about from 2004-02-29 to 2005-02-28. Is it one year or one day less?
You have to decide how you want to count, and then you can create an
algorithm.
The coding it probably not that hard, but the thinking that must be carried
out before is a little bit harder - for some of us
-------
Tomas