hi,
I want to know how 0s are left padded to a string.
i used this function - padstring(sting,"0",10) but it does a right padding.
I tried with -10 for a left pad, even then it is not working... can anyone help me on this?
Left padding
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
Str("0", 10-Len(MyString)) : MyString
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thanks
ray.wurlod wrote:...Code: Select all
Str("0", 10-Len(MyString)) : MyString
Thank you Ray. That is exactly what i needed.
Greetings,
Sven
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: