View all expressions
Interpolation

Number Counter With Separators

Formats a Slider Control value to two decimal places and adds thousands separators using periods.


num = effect("Slider Control")("Slider").value.toFixed(2).toString().replace(".", ",");
function addCommas(x) {
    return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
}
addCommas(num);

Number Counter With Separators

Practical use case

Formats a Slider Control value to two decimal places and adds thousands separators using periods.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image