플밍_ASP
classic asp 날짜 요일명 구하기
잠수콩
2017. 12. 26. 10:43
제목 : classic asp 날짜 요일명 구하기
소스 :
날짜 요일명 구하기<br>
<%
today = Date()
' 날짜 타입은 아래와 같이 해야한다.
' today = "12/26/2017" '정상
' today = "dec/26/2017" '정상
' today = "december/26/2017" '정상
' today = "2017-12-26" '정상
' today = "2017/12/26" '정상
' today = "2017.12.26" '오류
weekint = WeekDay(today)
Response.write "요일index = " & weekint & "<br>"
Response.write "요일명 = " & WeekDayname(weekint) & "<br>"
%>
----결과----
날짜 요일명 구하기
요일index = 3
요일명 = 화요일
내용 :
해당 일자의 요일 index / 요일명 구하기
일자는 어떤 형태든 상관없다.
예제 소스 파일 :
출처 :