qaos
March 15th, 2007, 05:03 PM
How do you increment a date by months?
EG: Date.today + 5 months?
I would like to take a date (1/3/2007) and add (subtract) a number of months to it. I know I can add days (Date.today+5 => 5 days into the future of today's date). But How do you change 1/3/2007 + 5 months => 6/3/2007, or conversely 1/3/2007 - 5 months => 8/3/2006
Qaos.
I just found it.
Use '<<' or '>>'
sorry for the wasted space.
EG: Date.today + 5 months?
I would like to take a date (1/3/2007) and add (subtract) a number of months to it. I know I can add days (Date.today+5 => 5 days into the future of today's date). But How do you change 1/3/2007 + 5 months => 6/3/2007, or conversely 1/3/2007 - 5 months => 8/3/2006
Qaos.
I just found it.
Use '<<' or '>>'
sorry for the wasted space.