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.

View date difference

  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:

     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.

View planned completion date difference

  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:

       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:

       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.

Previous pageView: calculate overtime cost in a Timesheet View
Next pageView: display the result of a calculation between two fields in a column

Workfront


Learn: Automating Workflows with Workfront Fusion - Unique Use Cases in Action

Workfront

Tuesday, Mar 4, 6:00 PM UTC

Looking for creative ways to use Workfront Fusion to solve business challenges? Join Pan Shahbazian of Starbucks as she shares three unique use cases that can transform your workflows.

Register

The Perfect Blend: A New Era of Collaboration with AEM and Workfront

Adobe Customer Success Webinars

Wednesday, Apr 2, 5:00 PM UTC

Explore how Adobe Experience Manager and Workfront integrate to help teams move from ideation to delivery without the usual bottlenecks, ensuring content is organized, on-brand, and ready to go live faster.

Register

B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth

Online | Strategy Keynote | General Audience

B2B brands are facing a digital revolution. Buyers expect hyper-relevant content and self-service, while internally AI is transforming...

Wed, Mar 19, 1:00 PM PDT (8:00 PM UTC)

Register

How Workfront Is Bringing Enterprise-Ready AI to Work Management

Online | Session | General Audience

AI is on the minds, hearts, and lips of every marketer and creative today. After all, it’s one of the best ways to keep pace with a scale...

Wed, Mar 19, 2:00 PM PDT (9:00 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more

Register to learn something new

WORKFRONT

Join Adobe product experts in live events where you will learn Adobe Workfront best practices, tips and tricks, and hear about the latest product features and updates.

Register