Dear Vega83;
This will work:
whileprintingrecords;
numberVar dur := datediff("s",minimum({@Print WMS},{@Date}),minimum({Command.EDI_CRT_TS},{@Date}));dur := if dur < 0 then 0 else dur;
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;
hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);
hhmmss := totext(hrs,"00") + ":" + totext(min,"00") + ":" + totext(sec,"00");
hhmmss
//formula end
Notice the second assignment of value to the Dur variable.
Regards,
ro
Rosemary Lieberman
rosemary-at-microflo.com,
Microflo provides expert consulting on MagicTSD and Crystal Reports.
You will get answers more quickly if you read this before posting: faq149-3762