Issue with DATETIME_DIFF - Getting NaN error when there's no Data Available

Hello, I’m having an issue with comparing two different dates to figure out how many days elapsed from the date listed to the date sold. Here’s my formula below that I’m currently using. How can I alter the formula so that if there are no dates entered into those fields it will just show up blank? Thanks for any help you can provide!

DATETIME_DIFF({Sold On},{Listed},‘days’) & ’ Days’

Screen Shot 2020-09-04 at 11.15.49 AM

Hi Leo,

You can use an IF statement to check if the fields are filled, and then only show the days if they are.

Something like this:

IF(AND({Listed}, {Sold On}),DATETIME_DIFF({Sold On},{Listed},'days')&" Days")

Or if you wanted to show something instead of blank, you can do this:

IF(AND({Listed}, {Sold On}),DATETIME_DIFF({Sold On},{Listed},'days')&" Days", "DATES NOT SET")

Cheers :slight_smile:

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.