Hi,
I have a table(imported)with numbers like
28210.933 and .371.
What I want is 28.210,933 and 0,371.
I have tried xpr1: CDbl(CLng([aa]*100)/100) and it works fine with the first number but I get error on .0371.
you get the error because it doesn't know which decimal point is correct. The one before 371 or the one after. You could check if the last charecter is a decimal point, and if so remove that charecter and then get the value. e.g temp: IIf(Right([field],1)=".",Left([field],Len([field]-1)),[field]) should remove last charecter if it is a decimal point.
Ooops. Here is another unexpected problem.
Again imported table (I can't do anything about it) with
a column where numbers are like 00000043,580000 and
0.8962. Val function doesn't work on both numbers neither other formatting does.
If it could help numbers are related to a column.Decimal numbers are related to DKK (currency) and the others to USD.
What should the numbers be? 00000043,580000 doesn't look like a number at all. If they are numbers in the source I wonder if they are being imported incorrectly. Maybe you could look at the source of the data and import using a different delimiter or even fixed width.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.