ACTIVE SERVER PAGE > function 예제 - 천단위 콤마 찍기
등록일 : 2017-07-03 20:20
조회수 : 93,028
천단위 콤마 찍는 User 함수 입니다.
유용하게 사용하세요.
Function alterLengthType(LengthSource)
Dim mok,namogi,returnValue,intVari
mok = int(Len(LengthSource)/3)
namogi = int(Len(LengthSource) mod 3)
if namogi > 0 then
returnValue = Mid(LengthSource,1,namogi)
for intVari = 1 to mok
returnValue = returnValue&","&Mid(LengthSource,namogi+((intVari-1)*3)+1,3)
next
else
returnValue = Mid(LengthSource,1,3)
if mok > 0 then
for intVari = 1 to mok
returnValue = returnValue&","&Mid(LengthSource,intVari*3+1,3)
next
end if
end if
alterLengthType = returnValue
end Function