3초기억력

핸드폰번호 자리수 함수(ASP) 본문

플밍_ASP

핸드폰번호 자리수 함수(ASP)

잠수콩 2008. 11. 12. 10:42
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


'//폰번호 11자리 중 4번째수가 0일경우 변환, 그외 에러처리
function phone_len_check(phone_num)
 
 If Len(phone_num) = 11 Then
  If Mid(phone_num, 4, 1) = "0" Then
   phone = Left(phone_num,3) & Right(phone_num, 7)
  Else
   phone = phone_num
  End If
 ElseIf Len(phone_num) > 11 Then
  phone = "N"
 Else
  phone = phone_num
 End if

 phone_len_check = phone
 
end Function

'//폰번호가 10자리인경우 11자리(4번째 0추가)로 강제 변환

function phones_len_check(phone_num)
 
 If Len(phone_num) < 11 Then
  phones = Left(phone_num,3) & "0" & Right(phone_num, 7)
 ElseIf Len(phone_num) > 11 Then
  phones = "N"
 Else
  phones = phone_num
 End if

 phones_len_check = phones
 
end Function

'플밍_ASP' 카테고리의 다른 글

ASP - Msxml2.DOMDocument 활용법  (0) 2008.11.17
ASP - URLDecode 함수. 퍼옴  (0) 2008.11.17
FileSystemObject 이용, 로그남기기(ASP)  (0) 2008.11.12
랜덤함수(Random, ASP)  (0) 2008.11.12
XMLDOM 사용법  (1) 2008.11.12
Comments