0
I need to truncate the decimal places not round up the number; how do I do this?
486 0 3
Posted 3 months ago
I've created a survey and a variable to report out the survey results.I need the decimal places as I report out on the measure. How do I truncate to 2 decimal places?
Thanks in advance
Answers ( 3 )
0
Posted 3 months ago
●
Edited 3 months ago
I've used VariableName.toFixed(x)
However many number you want to have AFTER the decimal is the number you put in (x).
Here's a link: W3Schools Reference to Javascript .toFixed(x)
Comments
( 3 )
0
3 months ago ●
Luke Hickey
● 231 |
4
Brent, use a name on your link so it looks better on a mobile. Links don’t wrap on community.
0
3 months ago ●
gjackson5
● 13 |
3
Thanks, Brent! This is exactly what I needed. Btw - it also rounds on the hundredth place, which is even better :)
0
0
Posted 3 months ago
Have you looked at using JavaScript? here's a link to the JS function it sounds like you would want.
Comments
( 1 )
0
0
Comments
( 0 )