
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 13, 2020 02:46 AM
Hello,
I’m dealing with DATETIME_DIFF. It worked until today, but now it return “NaN”, what’s happen?
1 Reply 1
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 13, 2020 06:42 AM
Hi @MATTEO_TONDO - the formula itself is working OK, but I suspect you have an issue in the formula configuration or in the data you are inputting to the formula. If one or both of the date fields is empty, then it will return NaN
You can get around this by testing for the presence of both dates first:
IF(AND({Date 1}, {Date 2}), DATETIME_DIFF({Date 1}, {Date 2}, 'days'))
which gives this:
JB
