NumberVar th:=0; NumberVar tm:=0; NumberVar ts:=0; NumberVar t_tot:=0; NumberVar t1:=0; NumberVar t2:=0; NumberVar t3:=0; StringVar tot1 :=""; StringVar tot2 :=""; StringVar tot3 :=""; StringVar timeint:=""; IF {scaarrest.FDFSH_TIME}<>"" AND {scamaster.FDSTPTIMEA}<> "" THEN tm=60*Val (Mid ({scaarrest.FDFSH_TIME},4 ,2 )) - Val (Mid ({scamaster.FDSTPTIMEA},4 ,2 )); th=3600*Val (Mid ({scaarrest.FDFSH_TIME},1 ,2 )) - Val (Mid ({scamaster.FDSTPTIMEA},1 ,2 )); ts=Val (Mid ({scaarrest.FDFSH_TIME},7 ,2 )) - Val (Mid ({scamaster.FDSTPTIMEA},7 ,2 )); t_tot=th+tm+ts; IF t_tot<0 THEN tm=60*Val (Mid ({scamaster.FDSTPTIMEA},4 ,2 )) - Val (Mid ({scaarrest.FDFSH_TIME},4 ,2 )); th=3600*Val (Mid ({scamaster.FDSTPTIMEA},1 ,2 )) - Val (Mid ({scaarrest.FDFSH_TIME},1 ,2 )); ts=Val (Mid ({scamaster.FDSTPTIMEA},7 ,2 )) - Val (Mid ({scaarrest.FDFSH_TIME},7 ,2 )); t_tot=th+tm+ts; t1=Abs (t_tot/3600); t_tot=t_tot-(t1*3600); t2=Abs (t_tot/60); t_tot=t_tot-(t2*60); t3=t_tot; tot1=ToText (t1); tot2=ToText (t2); tot3=ToText (t3); timeint=tot1+":"+tot2+":"+tot3; timeintThanks for the help.