Hello @anguria65
The equations code depends on the fields fieldname1 and fieldname2. If fieldname1 and fieldname2 are text fields with values in time format, you can implement the equation as follows:
DECIMALTOTIME(TIMETODECIMAL(fieldname1|r, 'hh:ii', 's')+TIMETODECIMAL(fieldname2|r, 'hh:ii', 's'), 's', 'hh:ii')
and
DECIMALTOTIME(ABS(TIMETODECIMAL(fieldname1|r, 'hh:ii', 's')-TIMETODECIMAL(fieldname2|r, 'hh:ii', 's')), 's', 'hh:ii')
Respectively.
Components like TIMETODECIMAL(fieldname1|r, 'hh:ii', 's')
take the raw value of the field and transform the from hours:minutes format to seconds.
The DECIMALTOTIME operation transforms the values in the other direction, takes the integer value in seconds, and transforms it into a text with the hours:minutes format.
If fieldname1 and fieldname2 are DateTime fields with the date component disabled and the time component enabled, you can modify the equations as follows:
DECIMALTOTIME(TIMETODECIMAL(fieldname1|r.split(' ')[1], 'hh:ii', 's')+TIMETODECIMAL(fieldname2|r.split(' ')[1], 'hh:ii', 's'), 's', 'hh:ii')
and
DECIMALTOTIME(ABS(TIMETODECIMAL(fieldname1|r.split(' ')[1], 'hh:ii', 's')-TIMETODECIMAL(fieldname2|r.split(' ')[1], 'hh:ii', 's')), 's', 'hh:ii')
Best regards.