기타/ASP

FormatDateTime

죠부니 2018. 5. 14. 12:02
반응형

https://www.w3schools.com/asp/func_formatdatetime.asp

Example

Display a date in different formats:

<%

d=CDate("2010-02-16 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 />")

%>

The output of the code above will be:

2/16/2010 1:45:00 PM
Tuesday, February 16, 2010
2/16/2010
1:45:00 PM
13:45


2010-02-16 오후 1:45:00
2010년 2월 16일 화요일
2010-02-16
오후 1:45:00
13:45

<%=Mid(now(),3,8)&" "&FormatDateTime(now(),4)%>

18-05-14 12:03


반응형