Brian Dunning's FileMaker Custom Functions

AbsolutePaddingZeroes ( number ; digits )

Pads a number to have static length of digits

  Average rating: 4.2 (46 votes) Log in to vote

Gjermund Gusland Thorsen   Gjermund Gusland Thorsen
Gudthlandum Consulting
http://www.gudthlandum.no

Share on Facebook Share on Twitter

  Sample input:
AbsolutePaddingZeroes( 123766; 10 )
  Sample output:
0000123766

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Pads a number to have static length of digits, max 100 for this example.

Might also work with string...

 

Comments

Erich   Erich, Germany
Jul 24, 2012
Why not:

Right(10^digits+number;digits)
 
Klaus   Klaus, Köln
Mar 9, 2016
Because this must not be a calculation.

0+1 = 1
"0"&1 = 01
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: