amount:=FORMAT(totalAmount); FOR K := 1 TO strlen(amount) DO BEGIN IF ((amount[K] <> '0') AND (amount[K] <> '1') AND (amount[K] <> '2') AND (amount[K] <> '3') AND (amount[K] <> '4') AND (amount[K] <> '5') AND (amount[K] <> '6') AND (amount[K] <> '7') AND (amount[K] <> '8') AND (amount[K] <> '9') ) THEN BEGIN NotNum := amount[K]; amount:= DELCHR(amount,'=',NotNum); END; END;but it didn't work
Answers
However you can use the code you have found, both txtCharsToKeep and txtString are both string variable. Also you need to add '.' at the end of the txtCharsToKeep otherwise it will strip out your decimal point.
Anyway, I declared the txtCharsToKeep as string and it worked...
Thanks a lot Kishorm