Calculate months

pangx623

New member
Local time
Today, 02:55
Joined
Nov 8, 2006
Messages
9
Hello,

I'm trying to calculate months not days between

EX: 1/1/06 to 6/30/06
I tried to use end date (-) begin date, but is only give me the difference in days. What expression do I use to get 6 months?

:confused:
 
See if the DateDiff() function gets you what you want.
 
pbaldy said:
See if the DateDiff() function gets you what you want.

Thank you. Here is what I ended up doing:

month: DateDiff("m",(DateAdd("d",-1,"01/01/2006")),"07/31/2006")


Instead of the result 1/1/06 - 7/31/06 = 6 months
I took one day off the start day to fully account for all months and thus will return = 7 months.

For my first post, I forsee this forum being a great tool to my career.
 

Users who are viewing this thread

Back
Top Bottom