Expression to format time value as a timecode

//Replace [TIME VALUE] with a number or time value
timeToTimecode([TIME VALUE]);

Example usage:

* Apply to the Source Text property of a text layer
* to show the current comp time as a timecode

More advanced examples:

Format a slider value as a timecode

Apply the following to the source text property of a text layer, make sure the text layer has a slider control effect applied. You can then animate the slider to produce a countdown / count up timer.

timeToTimecode(effect("Slider Control")("Slider"));