ASP

[TIP] 8자리 날짜 표현 방법(년월일 구분자 포함)

진실세상 2009. 1. 8. 15:42

<%
Function getCurDate(pDate, pSplit)
 getCurDate = Year(pDate) & pSplit & Right("0" & Month(pDate), 2) & pSplit & Right("0" & Day(pDate), 2)
End Function

Response.Write getCurDate(Now(), ".") & "<BR>"
Response.Write getCurDate(CDate("2009년 1월 7일"), "") & "<BR>"
%>

크리에이티브 커먼즈 라이선스
Creative Commons License