Hi
Has anyone got an easily formula to convert the number of days to a value
with years and months??

Signature
Rikesh
(VS6-SP5 / SQL2K-SP3A / W2K-SP4)
Ken Halter - 29 Sep 2004 18:02 GMT
> Hi
>
> Has anyone got an easily formula to convert the number of days to a value
> with years and months??
Since both months and years may have a variable number of days, it's
hard to say. If you use the DateAdd method, you can get just about any
info you need (like days or months or years between any 2 dates)

Signature
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..
Lance Wynn - 29 Sep 2004 18:26 GMT
Hi,
If you have a number of days, like 734 (versus an actual date) you can
get the years and months
by doing:
years = datediff("yyyy",0,numDays)
months = datediff("m",0,numdays)
It won't be 100% accurate because of leap years, and all, but it should be
pretty close.
Lance
Hi
Has anyone got an easily formula to convert the number of days to a value
with years and months??

Signature
Rikesh
(VS6-SP5 / SQL2K-SP3A / W2K-SP4)