How to read numbers starting w/ 0's

Results 1 to 3 of 3

Thread: How to read numbers starting w/ 0's

  1. #1
    L Guest

    Default How to read numbers starting w/ 0's

    I&#039;m trying to read item numbers and for some reasons.. the numbers that start with 0&#039;s just display without the 0&#039;s.<BR>For ex. number 01234 will display 1234. Can someone help on how to display the whole number??<BR>Thanks a lot!<BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: How to read numbers starting w/ 0's

    Do you know how many digits will be there??<BR><BR>you have to read it as a string and if you know how many digits it will contain<BR><BR>then use the right function<BR><BR>right("00000" & yournumber, 5)<BR><BR>this will take the last 5 digits so if your number only has 4 digits it will concatinate a 0 before it

  3. #3
    L Guest

    Default help again...

    I tried to use the right function and it did concatinate a 0. But there&#039;s a space between the numbers. For ex. The number should have at least 8 digits. It displays 0 123456. How do I delete the space?? Thanks for your help!<BR>(here&#039;s the code that I used)<BR>Response.Write "&#060;td&#062;" & right("00000000" & rs ("itemnum") ,8) & "&#060;/td&#062;"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts