Rounding a Decimal to Two Places

My goal is to convert long decimal numbers like this:

1.299999 or 14.58525

Into numbers like this:

1.29 or 14.58

I have tried the rounding function in Make but this seems to only work on integers and not decimals. Has anyone accomplished this before, and if so, I’d love to get some insight into your solution.

Welcome to the Make community!

If you want a formatted number as a string representation, use formatNumber (number; decimalPOINTS; [decimalSeparator]; [thousandsSeparator])

otherwise, to “round” a decimal number to 2DP, multiply by 100, use the round function, then divide by 100.

4 Likes

Thank you @samliew for the quick response, this worked perfectly in my scenario.

2 Likes