What does the Calculate Days Between Two Dates Action Do?

The 'Calculate Days Between Two Dates' action from the Workflow Calculations App by Integration Glue allows you to easily calculate the number of days between two specific dates within a HubSpot workflow. This action can be used to measure time intervals such as the number of days between a deal creation date and a deal close date, or to track the time elapsed between any two date properties.

By selecting the start date and end date, the app calculates the total number of days between them, and the result can be stored in a custom property or used for automated decisions in the workflow. This action is particularly useful for tracking durations, calculating service-level agreement (SLA) compliance, or managing time-sensitive follow-up tasks.

 

Screenshot 2024-12-10 134852

  • Date to Start From Specifies the starting point for the date difference calculation. Choose a date property (e.g., deal creation or last contacted date).

  • Date to End at Specifies the end point for the date difference calculation 

  • Property to Set Defines the target property where the result of an action will be stored (Shown on your corresponding workflow object)

 

 

Here’s a step-by-step guide on how to set up the "Calculate Days Between Two Dates" action in HubSpot Workflows using the Workflow Calculations App by Integration Glue:


Step 1: Create a New Workflow

  • In your HubSpot account, go to the Automation tab and select Workflows.
  • Click on the Create workflow button.
  • Choose a workflow type (e.g., Contact-based, Deal-based, etc.) depending on your use case.
  • Set your workflow’s trigger criteria (e.g., when a deal is created, a contact reaches a certain lifecycle stage, etc.).

Step 2: Add the "Calculate Days Between Two Dates" Action

  • After creating your custom properties and selecting your triggers, click the + button to add an action.
    *If you don't know how to create custom properties click here
  • On the action side bar drop down, scroll down and look for the "Workflow Calculation Actions App".
  • A drop down list of actions will appear. Select the  "Calculate Days Between Two Dates" action
Click Save to add the action to your workflow.


Step 3: Configure the Action

Choose the Start Date:

  • Click on the property Date to Start From field.
  • Select the date property you want to use as the starting point (e.g., Deal Created Date, Contact Created Date, or a custom date property which is found back on your HubSpot corresponding workflow object.)


Choose the End Date:

  • Click on the property Date to end at field.
  • Select the date property you want to use as the endpoint for the calculation (e.g., Deal Close Date, Last Contacted Date, etc. which is found back on your HubSpot corresponding workflow object.)

Select the Property to Store the Result:

  • Click on the property Property to Set field.
  • Choose a number-type property where the result (the number of days) will be stored. This can be a custom number property or an existing one, like Deal Duration or Time to Close. 


Step 4: Review and Activate

  • After configuring the action, review your settings to ensure everything is correct.
  • Save the workflow and ensure all other actions in your workflow are correctly set up.
  • Once you’re satisfied with the workflow, click Review and Publish to activate the workflow.

Step 5: Test the Workflow

  • Once your workflow is live, test it by triggering the action (e.g., create a deal or contact that meets your criteria).
  • Check the property you set to store the calculated result to verify that the number of days between the two dates is calculated correctly.

Step 6: Use the Calculated Days for Further Actions

  • You can use the calculated number of days in subsequent workflow actions (e.g., to trigger follow-up emails, set reminders, or create reports).
  • The result can also be displayed in your HubSpot dashboards for easy reporting.