Increase a Date Picker Property by Specific Amount of Days

Hi friends! I am looking to create a workflow that edits a contact property with a date picker field type. The current property that I have in our HubSpot is “Free Trial Enrollment Date,” which autopopulates the date a contact began a free trial on our platform. Our free trials are 7 days long. What I’m looking to create is a “Free Trial End Date” property, which will be 7 days after the “Free Trial Enrollment Date” property.

I was hoping to (and trying to) create a workflow that copies the “Free Trial Enrollment Date” value to my new “Free Trial End Date” property, and then increase that property value by 7 days. Unfortunately, the “Increase or decrease property value” action in a workflow will not apply to increasing or decreasing dates. I am open to figuring this out with or without a workflow, I was just hoping to figure it out without the help of our development team since their time is limited! Thank you in advance :slightly_smiling_face:

Hi @ARollman,

HubSpot does not have a native feature for that. It would require third-party solutions (e.g. passing on property values into a Google Sheet via Zapier, running the calculation there, copying the information back into HubSpot) or custom development.

The fastest way to achieve this would be custom code actions in Operations Hub Professional.

Best regards!

Thanks for you help, Karsten! I’ll try routing through a third-party :slightly_smiling_face:

Hi karstenkoehler,

Not sure if I’m doing something wrong here but when I tested out this functionality, the sample output I was shown was incorrect and not in a date format. The field that I had created is a “Date” field. Can you kindly advise if this is normal or if I’ve missed something?

Please disregard this, I’ve just realised that the sample output was being shown in milliseconds.

Hello,

I had this same issue (which lead me here) my solution was to use a workflow and use the Format Data function to add 36 months (my required timescale) to the field.

I have added a screenshot of the workflow I created. I hope this is useful.

This is great!

Thanks for sharing the screenshot with us, @KellyO!

it is so unintuitive that a “Format” feature would let you ADD 3 years to date field. Nice discovery.

Hi @ARollman,

Since my first reply, HubSpot expanded on the functionalities of calculation properties: Create calculation and rollup properties

This can now be easily achieved with such a property, see this example that calculates a date 30 days after the record create date:

The number of days is the first number in brackets. The rest of the numbers are there to calculate the amount of milliseconds as that’s the unit HubSpot uses here.

If you want to calculate a date before, simply switch the + for a - sign.

Best regards!

Nice one. Then we could use an automation to copy that field into another one, if necessary.

Karsten, thanks for this! It is working properly and supporting advanced automation ideas!

Hello Karsten,

Thank you for your solution this works well. However since it is in miliseconds months with 28 days or 31 days the calculation is not correct.

For eg I want to calculate the field as 11 months ahead from the move in date.

If the move in date is 1st April 2024, the output is 1st March 2025. However when the move in date is 1st May 2024, my output is 31st March 2025 instead of 1st April 2025.

I hope I was able to explain my problem. Is there a solution to this?

Thank you!

Hatim

Such an annoying money grab by HubSpot to push data hub… Here’s a good workaround:

Create a calculated property, then you can use a workflow to copy / paste this value where it makes most sense. Here’s my use case:
- Need to update project’s target due date based on date entered pipeline stage

- Created calculated property that is 7 days after “date entered pipeline stage” property

- WF updates the project’s native “project due date” to the calculated property

Now if a project goes past the project due date while in a specific stage, it updates the status to “Off-track” and displays a red visual tag :grinning_face_with_smiling_eyes: