Forum Discussion
Rsanjuan
Advocate III
9 years agoCalculating Days Between a Date and Today
Hi, I'm trying to calculate the number of days between 1 date field and today. I created a column for Today = DATE(YEAR(NOW()),MONTH(NOW()),DAY(NOW())) Then did this: Remaining Days Unti...
- 9 years ago
Yes, it will likely return negative INT value for today's date, if there are blanks.
You can nest the function in IF() function to return blank if [Due Date] is blank.
=IF(ISBLANK('Account Planning'[Due Date]),BLANK(),INT('Account Planning'[Due Date]-'Account Planning'[TodayCol]))
Rsanjuan
Advocate III
9 years ago
Thanks. For some reason, it's not working for me. There are some rows that have a "null" in the Due Date field. Will that cause it?
Chihiro
Solution Sage
9 years agoYes, it will likely return negative INT value for today's date, if there are blanks.
You can nest the function in IF() function to return blank if [Due Date] is blank.
=IF(ISBLANK('Account Planning'[Due Date]),BLANK(),INT('Account Planning'[Due Date]-'Account Planning'[TodayCol]))