How to have numbers that begin with Zero?

Hi, I’m looking for a way to start a group of sequential numbers with 0, for example 01, 02,03 etc. But for some reason I’m unable to figure it out by changing the column type. Is there a way to accomplish this?

Thank You!

Hi Chris!

Welcome to the Community. The table linked below has examples of two different methods you can use to add leading zeros. In the example, I use row ID as the value to format.

https://public.getgrist.com/p4zvsX9asVCc/2179-Using-id/p/1

The first method can be seen in the 5-Digit ID column. To simplify this, if you wanted to add a single leading zero (to have a two digit value), the formula would be:

'{:0>2}'.format($id)

The other method is the zfill Method. Again, to have a two digit number, the formula would be:

str($id).zfill(2)

Let me know if you have any questions!

1 Like

Excellent!! Thank you Natalie!!