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

Displaying Time & Minutes CR8 1

Status
Not open for further replies.

noslo

Programmer
Dec 10, 2001
24
US
Hello,

I am convertinmg actual seconds to minutes & seconds and rounding up the remainder seconds to 18 and then at 6 second intervals. 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,");)
 
It looks like you need to double up the /"/ like below:

Totext (Minutes,'00',0,"")+':'+
Totext(Seconds,'00',0,"");)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top