adding a month to a date using dateAdd()
Posted on 2009-05-07
I am joining two tables with dates. From one table, I am getting the record whose date is one month behind the other date (March 1, 2008 joins with April 1, 2008). I am using this statement...
sub.BeginDate = dateAdd(m, -1, ma.marketDate)
My problem is when joining values at the end of the month.
Using the dateAdd() function
March 31 will join with April 30
Since April does not have 30 days, it gets April 30th instead.
Is there a way to match the NEXT day instead of the Previous day?
I need March 31st to join to May 1st, not April 30th