Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

padding zeros at first of number

New Here ,
May 14, 2012 May 14, 2012

I have numbers ranging from 4 -10 digits. I need them all to be a uniform 15 digits.  I am trying to pad leading zero's on the front. I am new to writing scrip and need to know what code to use and where to put it.

744
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 14, 2012 May 14, 2012
LATEST

Either #numberFormat(myNumber,"000000000000000")# or #right("000000000000000"&myNumber,15)#.

I would probably use the second because a 15 digit number may overflow a numeric variable content. You'll have to make some adjustments to the second method if "myNumber" contains negative numbers.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources