I have two values in my database: a Product Expiration Date and a Renewal Notice. One is the lead time required to initiate a new contract before the existing contract expires. For example, with an expiration date of 12/1/25 and a renewal notice of 30 days, you would get a new date of 11/1/25. Is it possible to subtract the number of days to the expiration date in a new field called Final Date of notice? We are tracking this on a spreadsheet, and there has to be a better way.
Hi @cbierwerth23,
Sure, you can find the documentation here: Create calculation and rollup properties
Choose a custom equation, then add your expiration date minus the equivalent of 30 days in milliseconds. (HubSpot’s time unit in calculations are ms.)
Best regards
Unfortunately, the notice periods vary from 30 to 180 days. Would I need to convert all the 30-180 day values to milliseconds (create a field with milliseconds for each value) and then create a calculation using the Expiration date and notice time frame? This is the calculation in Excel =[@[Expiriation Date]]-[@[Renewal Notice]]
@cbierwerth23 as long as you have the notice time frame stored in a number property, you would simply replace the 30 in the formula with the property that stores the number:
renewal date - (property that contains number of days) * 86,400,000
So it would be an =If( type of calculation. Such as, if the notice is equal to 30 days, convert to milliseconds, if the notice is equal to 60 days convert to milliseconds?
@cbierwerth23 I’m not following. Why an if statement if you can simply multiply the number property containing the number of days by the correct equivalent of milliseconds?
Ok, I have another question similar to my question above. I have two dates: the expiration date and the effective date. I need to calculate the number of days from today to the expiration date. Similar to Days to close in Deals, from which I copied this calculation. I do not see a property for today, and this calculation is incorrect. I need something for today’s date to get it to calculate. Any Ideas?
max(0, round_down((([properties.expiration_date] - [properties.effective_date]) / 86400000), 0))
Hi @cbierwerth23,
Thank you for posting to the Community!
Tagging in Karsten since they were able to provide the Accepted Solution of this thread. Hi @karstenkoehler do you have any ideas for @cbierwerth23?
Thank you!
Cassie, Community Manager
@cbierwerth23 simply choose this calculation property type, it’ll automatically reference today as part of the calculation:
I was able to fix the formula with a calculated field and the ‘Time Until’ calculation. Thank you to everyone who helped!
