7 Replies Latest reply on Feb 25, 2016 12:59 AM by Amanjot Klair

    ifnull - error with replacement datetime value



      I want to calculate length of time based on a datetime and if it is null, I want it to use an alternate date.


      So I did this:  ifnull(datetimeA, datetimeB) from different data sources (different SQL tables but same database), I get this error:

      "cannot mix aggregate and non-aggregate arguments with this function".


      However, if I put ifnull(datetimeA, today()), it works.


      So, why doesn't it like my alternate datetime value?