Expression to limit the decimal places of a slider

/**
* Use the toFixed(); function to limit a value to a specifed number of decimal places
* Replace "NUMBER OF DECIMAL PLACES" with a number
*/
effect("Slider Control")("Slider").value.toFixed(NUMBER OF DECIMAL PLACES);

Example usage:

/**
* The following will limit a slider value to 2 decimal places
* 
* Apply the expression to the Source Text property of a text layer
* Make sure the text layer has a slider control effect applied
**/
effect("Slider Control")("Slider").value.toFixed(2);

More advanced examples:

Round a value to one decimal place

If you only need a single decimal place, just enter 1 in the toFixed function

effect("Slider Control")("Slider").value.toFixed(1);

Round a value to n decimal places

However many decimal places you need: just replace n with the number you need in the toFixed function.

effect("Slider Control")("Slider").value.toFixed(n);