Skip to main content

Using application script, add days to a date that was set in a form

Comments

1 comment

  • Tiffanie Staver
    Witte commented  ·  

    Hello,

    To add 30 days to your date with application scripts, you first need to create a variable with the original date, like this:

    Date newDate = currentValues["First Day"] as Date

    Next, you can update the variable by adding 30. If you add an integer to a date, application scripts will always treat that integer as a number of days (as opposed to hours, months, etc).:

    newDate = newDate + 30

    Finally, save the updated variable into the new date field.:

    currentValues["New Date"] = newDate as Date

    I hope this is helpful. If you have any additional questions on this, feel free to contact our support team directly at support@trackvia.com.

    Regards,

    Witte

    0

Please sign in to leave a comment.

Powered by Zendesk