08-23-2022 01:38 AM
Hi All,
My input is 123.45 → i should transform as 12345
123.456 then i should transform as 12345 should include only two characters after decimal point.
thank you in advance!
08-23-2022 03:59 AM
Hi Manigandan,
Try with this expression: $num.toString().substring(0, $num.toString().indexOf(“.”) + 3).replace(“.”, “”)
Where $num is the field name of the number.
Thanks,
Pero M.
08-23-2022 11:43 PM
08-24-2022 06:44 AM
@Manigandan: I will personally go with @bojanvelevski’s approach as it is less overhead on the system and easy to troubleshoot for other developers when you’re not working on that pipeline anymore.
Thank you @bojanvelevski for sharing that.
08-27-2022 02:08 PM
Or you can also do a parseFloat($num.toString()).toFixed(2).replace(‘.’,‘’)
FYI, this will force .00 for whole numbers e.g. 123 will be 12300
😀