• Got questions about HubSpot’s Smart CRM?

    Our product team is answering them live through March 6th!

    Ask us anything
  • Ready to build your local HubSpot community?

    HUG leaders host events, spark connections, and create spaces where people learn and grow together.

    Become a HUG Leader

Try to Count days since birthday in a number property

M_ElShibiny
Participant | Platinum Partner
Participant | Platinum Partner

We started with a birthday property in HubSpot and wanted to create another number property that always shows the number of days since that birthday.

Step 1: Workflows
We checked if a workflow could calculate the days and update a number property. But workflows don’t have an action that can take a date, subtract today, and save the result as a number.

Step 2: Property Sync
Then we tried using property sync. But this only copies values from one property to another; it doesn’t transform text into numbers, so it didn’t solve the problem.

Step 3: Rollup Property
We explored rollup properties. But rollups only work on associations (like companies to contacts or deals to line items) and can only sum/count existing numeric or date values. They cannot calculate “today minus birthday.”

Step 4: Calculated Property
Finally, we tested a calculated property using the “time since” option. It does calculate the difference and gives an output like “264 days.”
The problem is that the result is text, not a number, so it cannot be used in workflows, rollups, property syncs, or integrations.

Result:
All these methods failed to give us a numeric property that shows “days since birthday.”

0 Upvotes
1 Accepted solution
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

@M_ElShibiny could you please describe what you are going to do with that number - versus how you want to get there?

 

For example, if you're integrating with HubSpot via API, it's a lot easier to perform this calculation in a line of code.

 

If there's a specific existing integration which requires the number of days, that would be a different story.

 

Out of the box, there isn't a clean way (as far as I know) that would return that number. You could create a yearly recurring workflow that logs the current date in a custom date property whenever the birthday recurs - then create a "time since" calculation property. But I would still consider that less reliable than an additional line of code. If it must be inside of HubSpot, then I would suggest the aforementioned custom date property, workflow, calculation property.

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

View solution in original post

3 Replies 3
karstenkoehler
Hall of Famer | Partner
Hall of Famer | Partner

Hi @M_ElShibiny,

 

May I ask what you need this number for? Unless you need it specifically for seeing the number of days, there might be other ways to achieve your goal (such as relative date filters in segments or yearly enrolment in workflows x days before or after a birthday).

 

Best regards

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

M_ElShibiny
Participant | Platinum Partner
Participant | Platinum Partner

The main goal is to know the number of days since birthday of the contact and have them in a number property
That can be used later like at integrations

0 Upvotes
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

@M_ElShibiny could you please describe what you are going to do with that number - versus how you want to get there?

 

For example, if you're integrating with HubSpot via API, it's a lot easier to perform this calculation in a line of code.

 

If there's a specific existing integration which requires the number of days, that would be a different story.

 

Out of the box, there isn't a clean way (as far as I know) that would return that number. You could create a yearly recurring workflow that logs the current date in a custom date property whenever the birthday recurs - then create a "time since" calculation property. But I would still consider that less reliable than an additional line of code. If it must be inside of HubSpot, then I would suggest the aforementioned custom date property, workflow, calculation property.

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.