VBScript FormatDateTime 함수
❮ 완전한 VBScript 참조
FormatDateTime 함수는 유효한 날짜 또는 시간 식의 형식을 지정하고 반환합니다.
통사론
FormatDateTime(date,format)
Parameter | Description |
---|---|
date | Required. Any valid date expression (like Date() or Now()) |
format |
Optional. A value that specifies the date/time format to use
Can take the following values:
|
예시
예시
다양한 형식으로 날짜 표시:
<%
d=CDate("2019-05-31 13:45")
response.write(FormatDateTime(d) & "<br />")
response.write(FormatDateTime(d,1) & "<br />")
response.write(FormatDateTime(d,2) & "<br />")
response.write(FormatDateTime(d,3) & "<br />")
response.write(FormatDateTime(d,4) & "<br />")
%>
위 코드의 출력은 다음과 같습니다.
5/31/2019 1:45:00 PM
Friday, May 31, 2019
5/31/2019
1:45:00 PM
13:45
❮ 완전한 VBScript 참조