Format and '.'

Hi All, i know that there have been asked many many questions about the the FORMAT before, but i couldn’t find a solution to the following Problem: I need to Import Data from Excel. If the Tyoe of the Field in Attain is Code oder Text and the value to import is e.g. ‘10000’ then i use <fieldref<.value := FORMAT(importedValue); But the Format makes ‘10.000’ and it should be ‘10000’. I need to suppress the ‘.’ in the Format. What is the Syntax of the Parameters? Thanks in advance!!! Greetings, Frank

Hi Frank, I had the same problem as you. What I did in was simply to remove the dot. i.e. importedValue := DELCHR(FORMAT(importedValue),’=’,’.’); Seems like a naive solution but that solve my problem. :slight_smile: Hope this helps.

Thanks for your answer, but what do you do, if you want to import a dot? I only want to import dots, if the value contains dots. Greetings, Frank

Hi Frank, If you want to fix the decimal places, try and use this: FORMAT(DeciField,CharFieldLength,’<Precision,2:><Standard Format,2>’) In this case, you’ll have two decimal places. Hope this helps.

Frank Have you tried fieldref.Value := FORMAT(Importvalue,0,1); 0 = The full value; 1 = Standard format value 1 without the thousand seperator (I think that is what you are asking for).

Hi Stephen, thats what i need [:D] Thanks to all answers! Regards, Frank