Hi,
I have a text field in an MS ACCESS table which contains a decimal number.
How can the number be converted from decimal to integer.
Example
String = 10.54
Needs to be converted to 10 and can remain a string...
Please help asap
Thanks,
jebry's solution is appropriate if the current value is in fact a string. If it's already a numeric value and you simply want to truncate (not round) the fractional part then
Code:
IntegerValue = Int(TheNumber)
and if it's a string
Code:
IntegerValue = Int(Val(TheNumber))
[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
Hi,
Thanks for your response.
I am writring this as a query in Business Objects..
can u suggest i can take care of the numbers which dont have decimal in my query?
coz it is giving me a error in Row 9 which is the error on any whole numbers
1 ,2 ,3
Thanks again!
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.