C
cinnie
hi to all
I recently had a problem in my code that I've finally figured out. I'll
mention it here in case anyone has anything else to offer:
DateAdd("m", 1, "31-01-2010") has a value of 28-02-2010
If I apply DateAdd again to this result, I get...
DateAdd("m", 1, "28-02-2010") which has a value of 28-03-2010
But...
DateAdd("m", 2, "31-01-2010") has a value of 31-03-2010
In other words (this is what led to my coding error), applying DateAdd TWICE
for a ONE month interval is not the same as applying DateAdd ONCE for a TWO
month interval. This is probably obvious to all you gurus, but it sure had
me stuck!
I recently had a problem in my code that I've finally figured out. I'll
mention it here in case anyone has anything else to offer:
DateAdd("m", 1, "31-01-2010") has a value of 28-02-2010
If I apply DateAdd again to this result, I get...
DateAdd("m", 1, "28-02-2010") which has a value of 28-03-2010
But...
DateAdd("m", 2, "31-01-2010") has a value of 31-03-2010
In other words (this is what led to my coding error), applying DateAdd TWICE
for a ONE month interval is not the same as applying DateAdd ONCE for a TWO
month interval. This is probably obvious to all you gurus, but it sure had
me stuck!