Post Reply 
Bug or Not? Taking STRING of a string whilst making leading zeros
01-30-2018, 12:53 PM (This post was last modified: 01-30-2018 02:58 PM by toml_12953.)
Post: #4
RE: Bug or Not? Taking STRING of a string whilst making leading zeros
(01-29-2018 04:41 PM)StephenG1CMZ Wrote:  Is there a better way to get leading zeros in a string?

If the number is N and length you want is X, I use:

Code:
RIGHT(MID(STRING(10^X,1),2)+N,X)


Thanks to Joe's post, I changed the STRING function to include the format type.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Bug or Not? Taking STRING of a string whilst making leading zeros - toml_12953 - 01-30-2018 12:53 PM



User(s) browsing this thread: 1 Guest(s)