Forum Discussion
igormicev
5 years agoContributor
Hi @mtran21
What is the desired length with leading zeroes? you could have examples like 00123, 01234, or 00001.
Under the assumption that you know the length, for example 5 here, then you could do something like:
("00000"+
$MyNum.toString()).slice(-5)
and you’ll always be having leading zeros and lengths == 5.
HTH
- mtran215 years agoNew Contributor III
Thank you. This worked good