Skip to Content
Menu
This question has been flagged
1 Reply
9586 Views

Consider a integer field say "key"...

I want to display the value of key in "000001" format and also to restrict it to 6 digits

So if the value is 5 then it should display as "000005", 6 as "000006", 7 as "000007" etc....

Is there a way to achieve the same....

Avatar
Discard
Best Answer

Maybe this will help:

http://stackoverflow.com/questions/134934/display-number-with-leading-zeros

Avatar
Discard
Author

Ya thank you but they have used it to print, converting it to string and using zfill to fill the value... But am looking for integer formatting property to achieve it... If I didn't find any solution will do the same, will create a additional character field and apply that logic... thank you

well.. INTEGERS do not have leading zeroes.. you shoul cosider using char field , or field function (type=char) that dispays integer with leading zeroes...

Author

@bole, yup... finally I also did the same :)... thank you