Here are the custom properties I want to create. I’ve made them but theyre providing incorrect outputs.
Days Remaining in 2025: round_up(((1767225599000 - [properties.today_s_date]) / 86400000), 0); right now this returns 245 which is wrong.
Overall the purpose is that I want a property “FY Revenue Impact”. This property would calculate how much of a closed won deal would be attrbuted to the current fiscal year. Its supposed to reference the contract start and end dates, and the # of days left in the fiscal year.
The properties I’ve created such as “Days Remaning in 2025” and “FY 25 Revenue Impact” are not returning correct results. Any ideas?
Hi @Vasiki !
Thanks for sharing the context
Could you clarify how you’re populating the “Today’s date” property? That might be the root of the issue. One approach is to use a scheduled workflow that updates this property daily based on your account’s timezone. How are you currently handling it?
Thanks for sharing your question!
The main issue with your “Days Remaining in 2025” calculation seems to be the timestamp you’re using. The value 1767225599000 corresponds to a date in June 2025, not the end of the year. That’s why the number of days remaining is coming out incorrect.
To fix this, you should use the timestamp for December 31, 2025, 23:59:59 UTC instead. The Unix timestamp in milliseconds for that exact moment is 1767225599000 — actually, let’s double-check this:
December 31, 2025, 23:59:59 UTC in Unix timestamp (seconds) is approximately 1767225599
Multiply by 1000 for milliseconds: 1767225599000
Wait — you said you’re using 1767225599000 already? That actually corresponds to Dec 31, 2025, 23:59:59 UTC. So, if your formula is returning 245 days, the problem might be with the [properties.today_s_date] value—ensure that this property is storing the current date as a timestamp in milliseconds, and it updates daily.
A few things to check:
Make sure today_s_date is set correctly as a timestamp in milliseconds and reflects the current date when the calculation runs.
Confirm your time zones. Differences in timezone can affect your calculations.
Double-check your rounding logic.
Regarding the FY Revenue Impact property:
This is a more complex calculation since it involves prorating revenue based on contract start and end dates overlapping with your fiscal year.
Here’s the general approach:
Calculate the number of days the contract overlaps with the fiscal year.
Divide that by the total contract length in days.
Multiply that fraction by the total revenue to get the revenue impact for the fiscal year.
Unfortunately, HubSpot’s native property calculations might not support complex date range overlaps directly. You may need to:
Use custom code actions in workflows, or
Calculate this externally and update HubSpot via API, or
Use integrations or reports to analyze revenue impact.