on 09-01-2017 6:29 PM
Dear Experts,
I am using below formula to display total value in to HH:MM:SS . In below formula when
{@Total_Sec} value is greater than 86400 (86400/3600 = 24 hrs) then i am getting error message "Hours should between 0 to 23", Please suggest how to fix this. Also, i want to display value like 26 Hours 35 Minutes 40 Seconds in this format.
Formula:
local numbervar Hours := 0; local numbervar Minutes := 0; local numbervar Seconds := 0; local numbervar TotalSeconds := {@Total_Sec} ; Hours := Truncate(TotalSeconds / 3600); Minutes := truncate((TotalSeconds - (Hours * 3600))/60); Seconds := Truncate(Totalseconds - (Hours * 3600) - (Minutes * 60)); Time(Hours, Minutes, Seconds);
Something like that:
Numbervar TSec:=100000;
Numbervar Hrs;
Numbervar Mns;
Numbervar Scs;
Hrs:= Floor (tsec/3600);
Mns:= Floor (Remainder(tsec, 3600)/60);
Scs:= Remainder (Remainder(tsec, 3600), 60);
Totext(Hrs,0,"") + ":" + Totext(Mns,0,"") + ":" + Totext(Scs,0,"")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.