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