Skip to main content

Calculating start date when end date is given in script template

  • May 20, 2020
  • 1 reply
  • 17 views

Continuing the discussion from Autofill Task Dates Based on Project Due Date:

Can anyone explain how to do this calculation within the script block for record templates?
All of the scripts have the user putting in a start date with the task objects being created and calculating the end dates (probably explaining wrong).
I am using the PM Script Block 1.2 as my basis for making my template, but I want to do the opposite date calculations with:
End Date: user input
Days Out: field filled in already
Start Date: calculated

I am new to script so any ideas, direction, or specific help would be appreciated.

1 reply

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • 6009 replies
  • May 20, 2020

You can use the same method to calculate the start date as those scripts. However, instead of adding the number of days, subtract the number of days.