P pangx623 New member Local time Today, 02:55 Joined Nov 8, 2006 Messages 9 Nov 10, 2006 #1 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?
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?
pbaldy Wino Moderator Staff member Local time Today, 02:55 Joined Aug 30, 2003 Messages 36,269 Nov 10, 2006 #2 See if the DateDiff() function gets you what you want.
P pangx623 New member Local time Today, 02:55 Joined Nov 8, 2006 Messages 9 Nov 10, 2006 #3 pbaldy said: See if the DateDiff() function gets you what you want. Click to expand... 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.
pbaldy said: See if the DateDiff() function gets you what you want. Click to expand... 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.