VBScript DateSerial 함수

❮ 완전한 VBScript 참조

DateSerial 함수는 지정된 연도, 월, 일에 대해 하위 유형 Date의 Variant를 반환합니다.

통사론

DateSerial(year,month,day)
Parameter Description
year Required. A number between 100 and 9999, or a numeric expression. Values between 0 and 99 are interpreted as the years 19001999. For all other year arguments, use a complete four-digit year
month Required. Any numeric expression
day Required. Any numeric expression

실시예 1

<%

response.write(DateSerial(2010,2,3))

%>

위 코드의 출력은 다음과 같습니다.

2/3/2010

실시예 2

10일 빼기:

<%

response.write(DateSerial(2010,2,3-10))

%>

위 코드의 출력은 다음과 같습니다.

1/24/2010

❮ 완전한 VBScript 참조