Lists, Lead Scoring & Workflows

RMarques5
Member

How to compare two dates to update another field?

Hi all,

 

I've done some research but couldn't find anything specific to what I am looking for. First I'm trying to make a workflow to update one date field called 'Today's Date'. Have tried a couple of solutions but stil need to wait to check if the workflow works.

 

Once that is done, I would like to use that Today's Date and compare it with other dates I have in my account that will be populated via an API.

 

These fields are (Contact Properties):

- Field Date_01
- Field Date_02
- Field Date_03

 

The dates above are going to be different and are based on purchases of our products. Our idea is to look at these dates and if they match with Today's Date, then I need to update the value of another field with a specific status. Below the rules we are looking for:

 

IF Date_03 <= today’s date then field_status = “Value_03”

ELSE

IF Date_02 <= today’s date then field_status = “Value_02”

ELSE

IF Date_01 <= today’s date then field_status = “Value_01”

ELSE

IF Date_01 > today’s date then field_status = “Value_04”

 

I haven't been able to find how to address this. Is this something HubSpot can do? One thing to consider is that one customer can have specific dates today, but if they repurchase, then these dates get updated again, so they may re-enroll into the workflow a couple of times.

 

Is there a way to do this in HS? I don't have the operations hub activated.

Thank you,

Raf

0 Upvotes
1 Reply 1
ArisudanTiwari
Participant

How to compare two dates to update another field?

Hi @RMarques5,

This is possible to create and apply the rule via workflow, you need to check and update the date fields as if the First date (Field Date_01) field is empty will update the latest purchase date on that.
Next time if a person re-enrolls then the next date will add to the Field Date_02 section after checking that Field Date_01 is filled and Field Date_02 is empty then the latest date data will sync into data.
For this activity you don't need to have operations hub access. Thanks!