<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim dtDate
dtDate = Now()
response.write "UNFORMATTED: " & dtDate & " "
response.write "GENERAL DATE(0) " & FormatDateTime(dtDate, 0) & " "
response.write "LONG DATE(1) " & FormatDateTime(dtDate, 1) & " "
response.write "SHORT DATE(2) " & FormatDateTime(dtDate, 2) & " "
response.write "LONG TIME(3) " & FormatDateTime(dtDate, 3) & " "
response.write "SHORT TIME(4) " & FormatDateTime(dtDate, 4) & " "
response.end
%>
OUTPUT:
UNFORMATTED: 15/02/2010 19:11:57
GENERAL DATE(0) 15/02/2010 19:11:57
LONG DATE(1) Monday February 2010
SHORT DATE(2) 15/02/2010
LONG TIME(3) 19:11:57
SHORT TIME(3) 19:11
Whereas; this example works correctly:
OUTPUT:
15/02/2010 19:17:41
0 15/02/2010 19:17:41
1 15 February 2010
2 15/02/2010
3 19:17:41
4 19:17
|