Functionality to display passed days

Hi Community,

If we create a calculation field (time between) on two date property then it shows only in positive number of days, It would be great if hubspot provide a functionality to show in negative or in passed days if a custom property date is passed against today’s calendar date. It would be helpful in several automations.

Thanks!

Hello! I’ve been looking for similar and think I’ve found a decent solution until/if/when hubspot adds something like this. What I did was wrote a calculated hubspot property to figure this out. You have to start by creating a “today’s date” property and a workflow to update it. I followed this guide to do so:
https://community.hubspot.com/t5/CRM/How-to-create-a-Today-s-date-date-property/m-p/389836

Then I created the calculated property. Make sure the number format is set to “Unformatted number”. The formula is as follows:

if(([DATE TO COMPARE PROPERTY] < [TODAYS DATE PROPERTY]), (((-1) * time_between([DATE TO COMPARE PROPERTY], [TODAYS DATE PROPERTY])) / (((1000 * 60) * 60) * 24)), (time_between([DATE TO COMPARE PROPERTY], [TODAYS DATE PROPERTY]) / (((1000 * 60) * 60) * 24)))

You must change the “DATE TO COMPARE PROPERTY” and “TODAYS DATE PROPERTY” to your own HS properties using by replacing them (including the brackets) with your own. Click insert > properties and find yours and replace each instance.

What it does it takes the date to compare property and checks if it’s before todays date, if so it calculates the amount of days apart the dates are and makes it negative, otherwise if the compare date is in the future, it does the same but without changing the sign. Hope this helps!

@NickRM thank you for your beautiful solution!! This was so easy.

Agree! There should be a way to show if one date/time is before another date/time and it shows up as a negative.
@NickRM, thanks for your post. I tried it but my calculation was always 0. What might I have done wrong?