Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello i need to get the number of digits of a specific number, how can i do this?
In this case, if i have 12345 i need to get a mask of this type 11111.
Marco
not the shortest solution, but also possible to get the length of an integer:
Floor(Log10(Number))+1
regards
Marco
Len(Number) perhaps?
HIC
And to get mask, try like: Repeat(1, Len(YourNumber))
It's ok if the Len function return the number of digits of number; in these cases, what is the function return values:
11.888.432.122,67
1.500.039,55
I expect 13 for the first and 9 for the second, while i get 14 for the first and 9 for the second.
Thanks
Not sure I understand how you want to count...
If you just want the digits, you can use Len(Keepchar(Number,'0123456789'))
If you just want the integer part (including thousand separators), you can use Len(Floor(Number))
HIC
not the shortest solution, but also possible to get the length of an integer:
Floor(Log10(Number))+1
regards
Marco
Thanks a lot this works perfectly!!
Marco