Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Leading Zeros

Status
Not open for further replies.

genuineblonde

Technical User
Jun 8, 2001
30
US
I am trying to concantenate two Integer values. I need the second to display leading zeros. How do I format?
 
I assume as a string.
Code:
Function LeadingZ(strInt as string,intDigits as integer) as string
    LeadingZ = Right(String(intDigits,"0") & Ltrim(strInt),intDigits)
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top