Add x months to a date

Hi All,

I have being googling for an hour and haven't figured it out. I want to add a number of months to the date in column [inspection date]. The amount i will specify in column [inspection period]. That is to say that i end up with a date 6 months on from the inspection date. I can then create an automation that will tell me that these parts need inspecting in the next week.


Tags:

Best Answer

Answers

  • David Joyeuse
    David Joyeuse ✭✭✭✭✭

    Hi @Lockie Stewart-Baker

    According to your screenshot, you could use this formula in the next inspection date.

    =IF((MONTH([Inspection Date]@row) + VALUE(LEFT([Inspection Interval]@row, FIND(" ", [Inspection Interval]@row) - 1)))>12, DATE(YEAR([Inspection Date]@row) +1, MOD(MONTH([Inspection Date]@row) + VALUE(LEFT([Inspection Interval]@row, FIND(" ", [Inspection Interval]@row) - 1)),12), DAY([Inspection Date]@row)),DATE(YEAR([Inspection Date]@row), MONTH([Inspection Date]@row) + VALUE(LEFT([Inspection Interval]@row, FIND(" ", [Inspection Interval]@row) - 1)), DAY([Inspection Date]@row)))

    Should be good, but only works if your inspection interval is in months :)

    Hope it helped!

  • Lockie Stewart-Baker
    Answer ✓

    That works a treat. One day i will learn how to do all these formulas!!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!