Expand my Community achievements bar.

# Workfront

Check out the upcoming December events for Workfront System Administrators!
SOLVED

## Calculating Start Date from Need Date and Duration  Level 2

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

1 Accepted Solution  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. 4 Replies  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.   Level 2

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  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.   Level 2

Thank you!  It's working now.

Cori 