Highlighted

display leading zeros

Explorer ,
Sep 02, 2008

Copy link to clipboard

Copied

How to take an integer with no leading zeros and display it with leading zeros?

Thank you in advance.
#NumberFormat(Your_Integer, 0000)# is an example that will take a number and pad it with up to 4 leading zeroes.

Views

710

Likes

Translate

Translate

Report

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

display leading zeros

Explorer ,
Sep 02, 2008

Copy link to clipboard

Copied

How to take an integer with no leading zeros and display it with leading zeros?

Thank you in advance.
#NumberFormat(Your_Integer, 0000)# is an example that will take a number and pad it with up to 4 leading zeroes.

Views

711

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 02, 2008 0
LEGEND ,
Sep 02, 2008

Copy link to clipboard

Copied

repeatstring() function comes to mind...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 02, 2008 0
Explorer ,
Sep 03, 2008

Copy link to clipboard

Copied

#NumberFormat(Your_Integer, 0000)# is an example that will take a number and pad it with up to 4 leading zeroes.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 03, 2008 0
LEGEND ,
Sep 03, 2008

Copy link to clipboard

Copied

There are a couple of ways. Let's say you are looking for 7 digits altogether.

Method 1
NewString = '0000000' & thenumber;
NewString = right(newString, 7);

Method 2
while (len(thenumber) lt 7)
thenumber = '0' & thenumber;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 03, 2008 0
mkseto1 LATEST
New Here ,
Sep 20, 2019

Copy link to clipboard

Copied

I'm totally new to Acrobat:

In a fillable form, I have created a 5-digit numeric field but I actually need to pad the user-entry with leading zero's so that, for exmaple, if user entered "123", the field would become "00123". I assume the field needs to be formatted as "Custom" instead of "Number" but don't know what to put in "Custom Format Script". Again I have zero knowledge, so I'm hoping someone can tell me exactly how to do this .... much appreciated.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 20, 2019 0