- Home
·
- String Manipulation
·
- Adding zeros either in the left or right of the number depends on how many zeros you want to add. (
Adding zeros either in the left or right of the number depends on how many zeros you want to add. (
Adding zeros either in the left or right of the number depends on how many zeros you want to add. (i.e. 756 = 0000756 or 75600)
Rate Adding zeros either in the left or right of the number depends on how many zeros you want to add. (
(1(1 Vote))
Dim lenctr As Integer
lenctr = 0
Do While num_len - Len(Trim(v_num)) <> lenctr
addzero = addzero + "0"
lenctr = lenctr + 1
Loop
if pos = 0 then 'position of zeros are in left
addzero = addzero + Trim(v_num)
else ' position of zeros are in right
addzero = Trim(v_num) + addzero
endif
End Function
Adding zeros either in the left or right of the number depends on how many zeros you want to add. ( Comments
No comments yet — be the first to post one!
Post a Comment