⚙ Operations Hub

CBabb
Member

Create a formula for fractional years?

SOLVE

Does anyone know how to generate fractional years in a field?

 

I've tried using the Time Between calculation but it provides the obvious answer of how many (whole) years there are between one date and the other, which is useless for what I'm trying to do.

 

I'm looking to compare "today" to an "end date". Currently if the end date is February 2, 2033, and today is July 7, 2023, the output from HubSpot is 10 Years.

 

I'd like it say something like 9.6 years or whatever that fractional number would be.

 

Any ideas? Thanks!

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

Create a formula for fractional years?

SOLVE

Hi @CBabb,

 

Could you elaborate and provide more context for what you need this for? In the HubSpot UI, yes, the value is rounded but when exporting the information, for example, you get the decimal values.

 

karstenkoehler_0-1688793216769.png

 

If you want to get a decimal value, you could use a custom code action in a daily recurring workflow to perform the calculation, as a workaround.

 

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.

View solution in original post

1 Reply 1
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

Create a formula for fractional years?

SOLVE

Hi @CBabb,

 

Could you elaborate and provide more context for what you need this for? In the HubSpot UI, yes, the value is rounded but when exporting the information, for example, you get the decimal values.

 

karstenkoehler_0-1688793216769.png

 

If you want to get a decimal value, you could use a custom code action in a daily recurring workflow to perform the calculation, as a workaround.

 

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.