Is there logic that I am not seeing in the following results using DateDiff(“m”,[tmpTest]![startDate],[tmpTest]![endDate]) :
startDate endDate intMonths
1/1/2000 1/30/2000 0
1/1/2000 2/1/2000 1
1/1/2000 2/29/2000 1
1/1/2000 12/31/2000 11
1/31/2000 12/31/2000 11
Shouldn’t Jan 1-Dec 31 be 12 months?
Shouldn’t Jan 1 – Feb 29 be 2 months?
Shouldn’t Jan31 – Feb 1 be 0 months?
Perhaps I am using the wrong function or the right function in the wrong way. What I am attempting to accomplish is calculate the number of months between two dates, and based on the above I am getting information of little use (aka “useless information”). There is a function in Excel, “YEARFRAC()”, that does exactly what I am seeking, and I thought the DateDiff was essentially the same.
Any ideas and thoughts are greatly appreciated.
Ken