=Interval((if (type='Q' and customer_id=customer_id and (len(Trim(appointment_date))=0),approvedAt))-(if (type='A' and customer_id=customer_id and (len(Trim(appointment_date))=0),[message.createdAt])),'D hh:mm')
Can someone please help me with this. Anykind of information would be helpful