on 08-07-2020 8:31 AM
Hi Team,
I need to use a helper that will format a decimal number and keep only 2 numbers after the decimal.
example : Now we are getting reponse as 542.87000000 and I want to display it as 542.87
There is no helper that I can use for the above requirement. Can you please help here?
Regards,
Nisha
Hi Nisha,
you're right that there is currently no helper for formatting numbers. It is planned to provide one, but we can currently not give any timeline.
Some tricks that might help:
{{divide (round (multiply memory.myNumber 100) ) 100}}
Regards
Jonas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The new formatNumber helper supports exactly this use case:
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.