Datediff question

D

deb

When I do datediff("m", [projstart],[projend])
with 1/1/09 and 3/15/09 i get 3 months is there any way to get 3.5 months

I have the format set to standard

I need the answer to be at least one decimal.

Thanks
 
A

Allen Browne

Trouble is, months are not a set number of days. What's half a month in
February: 14 days? What about in March: is it 15.5 days? If something began
on Feb 26 and ended on April 3, that's 1-and-a-bit months, but how do you
calculate the fraction?

If you assume 30 days = 1 month, you could just use:
datediff("d", [projstart],[projend]) / 30
 
Top