View all expressions
Motion

Digital Timer, Hours, Minutes, and Seconds Format

Displays time in HH:MM:SS format, customizable via a slider.


slider = Math.round(effect("Slider Control")("Slider"));
sec = slider % 60;min = Math.floor((slider / 60) % 60);
hrs = Math.floor(slider / 3600);function addZero(n) {
return n < 10 ? "0" + n : n;
}
addZero(hrs) + ":" + addZero(min) + ":" + addZero(sec);

Digital Timer, Hours, Minutes, and Seconds Format

Practical use case

Useful for detailed time-based animations, such as timers or digital displays.

Check out similar expressions

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

a mesh of elegant lines transparent image