Hi, Does anyone know how to add thousands separators and decimal to a label in AI2? 23599 eg the idea is that it looks like 23,500
I appreciate any help ....
--
I recently did this for whole numbers. You might add decimals support to it: https://www.facebook.com/notes/app-inventor-projects/ai-classic-formatting-number-demo/581384268599523
This one has more features - including decimals: https://groups.google.com/forum/#!searchin/app-inventor-developers-library/Formatting$20number/app-inventor-developers-library/xQPmEfXIB3c/5D6oy1VWWtwJ
This one has more features - including decimals: https://groups.google.com/forum/#!searchin/app-inventor-developers-library/Formatting$20number/app-inventor-developers-library/xQPmEfXIB3c/5D6oy1VWWtwJ
I use this blocks for thousands separator
--
Nice solution, tumorlike :)
--
There is just one small problem, the thousands separator might be . or , depending on the country your phone lives in (And each has been used in the solutions above!). Here is a trick to figure out what it is:
The "random fraction" is a number between 0 and 1. If you see a , then the thousands separator will be a . and the other way around.
The "random fraction" is a number between 0 and 1. If you see a , then the thousands separator will be a . and the other way around.
--
댓글 없음:
댓글 쓰기