I want a numeric field to be always displayed as a 3-digit number. Padded left with 0s as needed.
Example: 3 is shown as 003, 24 as 024 and so on. Assuming max number is 999.
How do I do so? Thanks.
I want a numeric field to be always displayed as a 3-digit number. Padded left with 0s as needed.
Example: 3 is shown as 003, 24 as 024 and so on. Assuming max number is 999.
How do I do so? Thanks.
Function Lpad (Value as String, PadCharacter as String, PaddedLength as Integer)
Lpad = string(PaddedLength - Len(Value), PadCharacter) & Value
End Function
Ref.
Lpad("3", "0", 3)