Create Yesterday's Date
Last updated
Last updated
This document provides instructions on creating a custom field in HubSpot that displays yesterday's date. The custom field will be based on the "Today's Date" field created in a previous video.
HubSpot account
Access to HubSpot settings
Log in to your HubSpot account.
In the top-right corner, click the Settings icon.
In the left sidebar, click Properties.
Click the + Add field button.
In the Field name field, enter "Yesterday's Date".
In the Field type dropdown, select Calculation.
In the Calculation type dropdown, select Custom equation.
In the Output type dropdown, select Date.
In the Formula field, enter the following formula:
This formula subtracts one day from the "Today's Date" field to calculate yesterday's date.
Click the Test button to validate the formula.
Verify that the formula returns the correct yesterday's date for different today's dates.
Click the Save button to create the custom field.
Navigate to a contact record.
Observe that the "Yesterday's Date" field is not yet updated because it depends on the "Today's Date" field.
Update the "Today's Date" field for the contact.
Refresh the contact record.
Verify that the "Yesterday's Date" field is now updated to the day before the updated "Today's Date" field.
By following these steps, you can create a custom field in HubSpot that automatically displays yesterday's date based on the "Today's Date" field. This field can be useful for filtering records, creating automations, and other purposes in HubSpot.