아는 것이 좋은 것이다.

[ASP] 숫자 앞에 원하는 개수만큼 0 붙이기 본문

ASP

[ASP] 숫자 앞에 원하는 개수만큼 0 붙이기

start0 2014. 7. 6. 12:31

'------------------------------------------------

' 사용예 : format(123, "00000") ==> 000123

'------------------------------------------------

function format(ByVal szString, ByVal Expression)

if len(szString) < len(Expression) then

format = left(expression, len(szString)) & szString

else

format = szString

end if

end function

Comments