Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Total Multiply by Formula? Help ;)

Status
Not open for further replies.

kovas

Technical User
Aug 6, 2002
88
US
I am trying to multiply a Running Total by a Formula to get a grand total of contact hours.

ToNumber({#Showed}) * ToNumber({@Hours2})

I get an error saying "The string is non-numeric"?


@Hours2:

WhilePrintingRecords;
NumberVar TotalSec := {@Hours};
NumberVar Hours := Truncate (Remainder ( TotalSec,86400) / 3600);
NumberVar Minutes := Truncate (Remainder ( TotalSec,3600) / 60);
NumberVar Seconds := Remainder ( TotalSec , 60);

Totext ( Hours, '00', 0,'') + ':'+
Totext ( Minutes,'00', 0,'') + ':'+
Totext ( Seconds,'00', 0,'')

@Hours

DateDiff("s", {Schedule.StartTime}, {Schedule.EndTime})

#Showed

Counts the number of students scheduled for class with attendance marked Present

thank you :)
 
never mind, figured out what was wrong ;)

ToNumber({#Showed}) * ToNumber({@Hours})

and then convert the total seconds to grand total hours ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top