Calculating Start Date from Need Date and Duration | Community
Skip to main content
Level 2
November 1, 2022
Solved

Calculating Start Date from Need Date and Duration

  • November 1, 2022
  • 1 reply
  • 968 views

I am working on an intake form and I have a field for when the item needs to complete (Due Date) and an estimate for how long it will take (Duration Estimate).  Is there a way to calculate when it needs to start based on those two items?  

Thanks,

Cori

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Richard_Le_

Hi Cori,

 

What data format is your duration estimate field? It needs to be a number format in order for the calculation to work. My calculation assumes that the duration estimate is a number of days. 

 

If your users are typing the duration as text (i.e., "3 months"), Workfront wont be able to read this as a number to carry out any mathematical calculations. 

 

If you can have your users enter the estimated duration consistently as a number, we could update the calculation to accommodate weeks or months. For example, the below code would subtract the number of months specified in the duration estimate from the due date. 

 

ADDMONTHS({DE:Due Date},-{DE:Duration Estimate})

Best Regards,

Rich. 

1 reply

Community Advisor
November 1, 2022

Hi Cori,

 

You could achieve this with a calculated date field that subtracts the duration estimate from the due date. The calculation would look something like this:

 

ADDWEEKDAYS({DE:Due Date},-{DE:Duration Estimate})

Best Regards,

Rich.

CoriStAuthor
Level 2
November 2, 2022

Rich,

I thought it was that simple, but when I try this I get an error that says "ADDDAYS must contain 2 values".

 

If I remove the minus sign, it tells me that "Due Date" is not valid in this expression.

 

Any ideas?  I also need to figure out how to convert my Duration into days (it will likely be weeks or months).

Thanks!

Cori

 

Richard_Le_Community AdvisorAccepted solution
Community Advisor
November 2, 2022

Hi Cori,

 

What data format is your duration estimate field? It needs to be a number format in order for the calculation to work. My calculation assumes that the duration estimate is a number of days. 

 

If your users are typing the duration as text (i.e., "3 months"), Workfront wont be able to read this as a number to carry out any mathematical calculations. 

 

If you can have your users enter the estimated duration consistently as a number, we could update the calculation to accommodate weeks or months. For example, the below code would subtract the number of months specified in the duration estimate from the due date. 

 

ADDMONTHS({DE:Due Date},-{DE:Duration Estimate})

Best Regards,

Rich.