rounding and formatting decimals (forced) | XM Community
Skip to main content
I have some embedded data random decimal values that I am using to form my questions. I have them rounded like this:



$$e{ round( e://Field/Savings , 2 ) }



this works great when the values are not divisible by .1, which then will show along the lines of $4.2



Is there any way to format to show 2 decimals, even when the 100's spot is a zero? (would like it to show $4.20)
You can calculate using JavaScript and store it as embedded



https://stackoverflow.com/questions/6134039/format-number-to-always-show-2-decimal-places
ahhh, so not just using the normal block question setup. Now why couldn't this be an undocumented feature like mod (%) in the math section... 😀

Leave a Reply