Add 0 to a one digit number


/ Published in: ASP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function a0(n)
  2. n = trim(n)
  3. a0 = n
  4.  
  5. if trim(n) = "" then exit function
  6.  
  7. n = cstr(n)
  8.  
  9. if len(n) < 2 then n = "0" & n
  10. a0 = n
  11. end function

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.