View Full Version : Adding Exactly One Month


shuff
07-11-2001, 10:50 AM
Is there an easy way to start with a date, say 7/11/2001, and then write a calculation for the next date in line, taking into account that different months have more or less days? My plan at this point is to write a series of If/Thens using Month([date]) and then attaching the correct number of days to the result, so if the starting date is 7/11/2001, my If/thens would see that it is July, need to add 31 days, so next date would become 8/11/2001. Klunky. Any easier way? Thanks, SLH

pdx_man
07-11-2001, 01:14 PM
Try:

DateAdd ("m",1,[TheDate])

Axis
07-11-2001, 01:14 PM
Use the DateSerial function to add one month to today's date regardless of how many days are in between. For example:

[next date]=DateSerial(Year(Date()),Month(Date())+1,Day(Date( )))

shuff
07-12-2001, 06:43 AM
The DateAdd approach worked great! As a control source in a macro, it was the more compact of the two suggested. Thanks to pdx_man and Axis for saving me a bunch of work! -SLH