View: calculate time and date differences

IMPORTANT
You cannot calculate the time and date difference in Adobe Workfront between two different objects of the same kind. For example, you cannot calculate the time and date difference between two dates on two different projects, tasks, or issues.

You can calculate the difference between the following:

  • The time and date difference between two date fields on the same object
  • The time and date difference between a field on an object and another field on the parent object
TIP
These calculations display the number of days between the two dates. The result displays in days. The timestamp on the date field is also taken into account, and the number of days might be followed by decimals if the timestamps don’t match. If the task was completed late, the number of days displays as a negative value.

Access requirements

Expand to view access requirements for the functionality in this article.

You must have the following access to perform the steps in this article:

table 0-row-2 1-row-2 2-row-2 3-row-2 layout-auto html-authored no-header
Adobe Workfront plan Any
Adobe Workfront license

New:

  • Contributor to modify a view

  • Standard to modify a report

Or

Current:

  • Request to modify a view

  • Plan to modify a report

Access level configurations

Edit access to Reports, Dashboards, Calendars to modify a report

Edit access to Filters, Views, Groupings to modify a view

Object permissions Manage permissions to a report

For more detail about the information in this table, see Access requirements in Workfront documentation.

Calculate the time and date difference between two date fields on the same object

For example, you can calculate the difference between the Planned Completion Date and the Actual Completion Date of a task.

  1. Go to a list of tasks.

  2. From the View drop-down menu, click New View.

  3. Click Add Column and start typing “Planned Completion Date” in the Show in this column field then select it when it displays in the list.

  4. Click Add Column and start typing “Actual Completion Date” in the Show in this column field then select it when it displays in the list.

  5. Click Add Column, then click Switch to Text Mode.

  6. Hover over the text mode area, and click Click to edit text.

  7. Remove the text you find in the Text Mode box, and replace it with the following code:

    code language-none
     displayname=Planned-Actual Completion Date
     linkedname=direct
     querysort=plannedCompletionDate
     textmode=true
     valueexpression=ROUND(DATEDIFF({plannedCompletionDate},{actualCompletionDate}),2)
     valueformat=HTML
    
  8. Click Save, then Save View.

Calculate the time and date difference between the field on an object and another field on a parent object

For a list of objects and their parents, see the “Understanding the Interdependency and Hierarchy of Objects” section in Understand objects in Adobe Workfront.
For example, you can calculate the difference between the Planned Completion Date of a task and the Planned Completion Date of its parent task, or of the project that the task is on.

  1. Go to a list of tasks.

  2. From the View drop-down menu, click New View.

  3. Click Add Column and start typing " Project Planned Completion Date" or “Parent Completion Date” in the Show in this column field then select it when it displays in the list.

  4. Click Add Column and start typing “Planned Completion Date” in the Show in this column field then select it when it displays in the list.

  5. Click Add Column, then click Switch to Text Mode > Edit Text Mode.

  6. Remove the text you find in the Edit Text Mode box, and replace it with one of the following codes:

    • To display the difference between the Planned Completion Date of the project and that of the task:

      code language-none
       displayname=Project Planned Completion - Task Planned Completion (Days)
       textmode=true
       valueexpression=ROUND(DATEDIFF({project}.{plannedCompletionDate},{plannedCompletionDate}),2)
       valueformat=HTML
      
    • To display the difference between the Planned Completion Date of the parent task and that of the task:

      code language-none
       valueexpression=ROUND(DATEDIFF({parent}.{plannedCompletionDate},{plannedCompletionDate}),2)
       textmode=true<br>valueformat=HTML
       displayname=Parent Planned Completion - Planned Completion (Days)
      
  7. Click Done, then Save View.

recommendation-more-help
5f00cc6b-2202-40d6-bcd0-3ee0c2316b43