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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's wrong with this code?

Status
Not open for further replies.

noslo

Programmer
Dec 10, 2001
24
0
0
US
Hello,

The following code is working except when I try to display the time. I get an error message at the Totext portion that states,

The matching " for this string is missing

immediately after the second plus sign.

I have been working with CR8 for only a month. Can someone please review and let me know what I am doing wrong. Once again, I really appreciate the help.


WhileReadingRecords;
NumberVar TotalSeconds:= {tbl_cdr.Call_Seconds};

NumberVar Minutes:= Truncate(TotalSeconds/60);
NumberVar Seconds := Remainder(TotalSeconds, 60);
NumberVar TotalMinutes := (Truncate(TotalSeconds/60)+1);

if Remainder (TotalSeconds, 60) in [1 to 18] then Seconds:=18
else if Remainder (TotalSeconds, 60) in [19 to 24] then Seconds:= 24
else if Remainder (TotalSeconds, 60) in [25 to 30] then Seconds:=30
else if Remainder (TotalSeconds, 60) in [31 to 36] then Seconds:=36
else if Remainder (TotalSeconds, 60) in [37 to 42] then Seconds:=42
else if Remainder (TotalSeconds, 60) in [43 to 48] then Seconds:=48
else if Remainder (TotalSeconds, 60) in [49 to 54] then Seconds:=54
else if Remainder (TotalSeconds, 60) in [55 to 59] then Seconds:= 00;

if Remainder (TotalSeconds, 60) in [55 to 59] then Minutes:= Minutes + 1 else seconds:= seconds;


Totext (Minutes,'00',0,")+':'+
Totext(Seconds,'00',0,");)
 
Hi,

Totext(Seconds,'00',0,");) is the ;)included with the formula. Try removing the extra bracket.


Thanks,
Hamida


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top