Days without End date isn't calculating duration

I’m having an issue in Noloco. I have a field called DIR (Days in Recon) for my car dealership portal i’m building. This field is supposed to calculate the days by subtracting the start date from the end date, and if the end date is empty, it subtracts the start date from Todays date.

Below is the formula i used, but it’s only populating for fields that have an end date and stays empty for other fields.

Please how do i rectify this.

formula - IF(ISBLANK(End Date), DAYS(TODAY(), Start Date), DAYS(End Date, Start Date))

Just did some testing, and it seems that empty date fields are stored as 0.

Instead try: IF(End Date=0, DAYS(TODAY(), Start Date), DAYS(End Date, Start Date))

1 Like

Thank you for the reply @jesse. I’ve just tried this out but it’s still not working.

As you can see in the attached image, it still previews as null.

As @jesse pointed out, you can’t use empty dates with any of the date-based formulas (as is the same in Google Sheets).

So you should use ISBLANK to check if they’re blank/empty first.

In your example, it’s likely that Start Date or End Date are still blank.

Also, worth mentioning, we don’t support TODAY() at the moment, which means this formula will only be correct when you create it, but it won’t update continously

It’s possible that empty dates being stored as 0 is only the case because of my data source being Airtable.

@darragh good to know about TODAY(), I wasn’t aware of that.

Jeff, I’d recommend isolating one field at a time to identify the issue, as it might be that {Start Date} is the problem.

  1. Start with IF(End Date=0, 1, 0) to see what the result is (null, 0, or 1)
  2. Try IF(ISBLANK(End Date), 1, 0) and see if the result is the same
  3. If you don’t get a null, then introduce the DAYS() function one at a time

Also, given that TODAY() isn’t dynamic, you’ll probably need a helper field of some sort.


Hi @darragh, I have tried using ISBLANK to check for blank/empty dates first, but it still returns null.

I also created a column to update “Today’s date” using Make automations and try to use that to subtract the days from “Start Date” if the “End Date” is empty, but i’m still getting null.

Seems like the problem is from the blank date field.

Have also reached out to Noloco support/engineering team and they’ve been on it for 2 days with no significant result yet.

Hey @Jeff - as @jesse try breaking down your formula to see which part is throwing the error (resuling in null)

I think DAYS({date}) will always throw an error if {date} is empty, due to how formulas in excel/spreadsheets are calculated.

So you actually need to do DAYS(IF(ISBLANK({date}), 0, {date}) of wrap it in IFERROR(..)

Does that help?

1 Like