# Padding Numbers for Time in AS3

**URL:** https://forum.kirupa.com/t/padding-numbers-for-time-in-as3/310113
**Category:** flash
**Created:** [June 1, 2010, 10:44pm UTC](https://forum.kirupa.com/t/padding-numbers-for-time-in-as3/310113 "2010-06-01T22:44:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![as3ohh](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@as3ohh](https://forum.kirupa.com/u/as3ohh)
#### Post date: [June 1, 2010, 10:44pm UTC](https://forum.kirupa.com/t/padding-numbers-for-time-in-as3/310113/1 "2010-06-01T22:44:24Z")

</div>

I am working on a time display that takes a time reference from a video. What is the best way to pad the numbers so they show correctly as 00:00, 01:23, etc.

Would like to stay away from just padding a string “0” in front, so I can test the var for proper time and use it elsewhere. Has anyone already done this with some code already floating around 🙂 ?
