question911
MIS
Crystal Reports 9
Informix 7
No authorization to create views or stored procedures.
I'm using the following formula to convert number data type to time format. It works fine, except in this type of situation when 60 seconds doesn't convert over to a minute. For example, 00:12:60. In this case, it should be 00:13:00
Any pointers would help.
ASAALL is a variable.
(Hours1:= ToText(Truncate(asaall/3600),0);
Minutes1:= ToText(Truncate(Remainder(asaall,3600)/60),0);
Seconds1:= Totext(Remainder(Remainder(asaall,3600),60),0));
(if length(Hours1) < 2 then '0') + Hours1 +":"+
["0",""][length(Minutes1)] + Minutes1 +":"+
["0",""][length(Seconds1)] + Seconds1
Informix 7
No authorization to create views or stored procedures.
I'm using the following formula to convert number data type to time format. It works fine, except in this type of situation when 60 seconds doesn't convert over to a minute. For example, 00:12:60. In this case, it should be 00:13:00
Any pointers would help.
ASAALL is a variable.
(Hours1:= ToText(Truncate(asaall/3600),0);
Minutes1:= ToText(Truncate(Remainder(asaall,3600)/60),0);
Seconds1:= Totext(Remainder(Remainder(asaall,3600),60),0));
(if length(Hours1) < 2 then '0') + Hours1 +":"+
["0",""][length(Minutes1)] + Minutes1 +":"+
["0",""][length(Seconds1)] + Seconds1