Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

DateDiff Help

trying to work on some lead times through by obtaining the difference between 2 dates   Committed/Done Diff = IF([DATE1] > [DATE2],"",DATEDIFF([DATE1],[DATE2],DAY))   what i am trying to achieve ...
  • ankitpatira's avatar
    10 years ago

    Anonymous Reason you're getting this error is because from your IF statement if condition is false then you're returning blank which is of data type text and if true you're returning date. You can't have different data type returns from single IF statement. Therefore if you do conditional column as below it will work.

     

    Committed/Done Diff = IF([DATE1] > [DATE2], today(), DATEDIFF([DATE1],[DATE2],DAY))