How to customize the number format?

How can I format the number with (.) And (,) Example: $ 1,000,000.00 in Thunkable X

I’m doing math operations and displaying on a label

Can someone help me? Thanks

Hi there,

Here is a sample app that will reformat any number to insert commas as you are talking about.
“10000” will be reformatted to “10,000”, “1000000” will be reformatted to “1,000,000”, etc.

This app will also remove excess zeros from the front of a number, eg. “01” will be reformatted to “1”, “00001110” will be reformatted to “1110”.
This can be removed by removing a block from the ‘cleanup’ function.

You can add any desired currency symbol by adding to the ‘join’ block in the ‘format number’ function.

You can see a previous tutorial in rounding numbers here.

Let me know if you have any questions about either of these sample apps!

Thanks,
Jane

Hello @jane, can you share your example again? The link is broken!

A post was split to a new topic: Display Custom number formats

Hey @paulovaz72

This is great! Can you share a sample project of this! Would love to move it to the examples/snippets section of the forum!

Sure! Here it is:

https://x.thunkable.com/projects/629e126fe284bb0011113b26/c02c0bf8-d529-4043-a547-e532a0066387/designer

Regards,

Paulo Vaz

2 Likes