Forum Academy Marketplace Showcase Pricing Features

Zero padding as a number format

Hi all,

Can numbers have zero padding? Like specifying decimal places, but going left-ward. I want to show a time in a text object with a zero when the hour, minute, or second is less than 10. Unless it’s already implemented?

I had to use a long list of conditions as a work-around.


On times, yes you can use a zero pad, you can see this on my time demo, you just change the :formatted as to suit your needs. If you just want to show the time, choose the predefined format, or use your own custom field and set the attributes.

You can see the time being displayed an updated in this demo here:

Thanks for the reply, but I’m not looking for the current time. I have the user using sliders to specify a time, which I then want to show in a text object that looks like time.

Three sliders, one for hours, another minutes, a third one for seconds. As any of the three sliders change, the corresponding time in the text object shows the time, including the zero-padding.

I had to use around a dozen conditions based on each number having one or two digits.

Yes it is possible, I have just knocked this up to see what you think…it is done by manipulating the time components of a date value.

The editor link is:

1 Like