I'm trying to calculate the number of days between EITHER date_added and date_removed OR between date_added and today if date_removed is null.
It seems to me that I need, somehow, to get the timestamp returned by unix_timesamp(PR_DATE_ADDED) to be equal to today if it is null.
Been going round in circle with this for a few hours and geeting somewhere.
Using 3.22.
Anyone any ideas?