Ability to Subtract Months from Date

Ability to Subtract Months from Date

Comments

  • Hello,

    I am working on the ADOT project and I am able to Add Months to a date, but is there a step or function to be able to Subtract Months (Days and Years too) from a date?

    Thanks for your help!

  • Hi,

    There is a subtract timespan step under Data > Dates.

  • I saw that and tried to use it – but the values are only in seconds, minutes, hours, and days (when the mapping type is Constant) – is there no value for months or years?

  • Unknown
    edited November 2023

    Months and Years arent an option. You can use converter flows for this.A converter flow that subtracts years from a current date. You can build a similar converter flow for months or for your needs by using the month or year variable available under the Date as shown in the screenshot.

    The easiest way to do this would be to pass a negative value into the Add Months step. This will subtract months from the datetime and calculate a new datetime for you.

    Thank you.

Sign In or Register to comment.