It looks like you're new here. If you want to get involved, click one of these buttons!
It is possible to reduce a float example: 21.50000 to just 4 digits like 21.50 , without converting the float to a string then using the substring function.
What are the exact conditions for the end result you want?
Look at these references.
I was after reducing a float such as 21.500000 to just 21.50
I have got the result I wanted by using the nf() function, thanks.