Format date and time
Description:
How to format date and time using ASP and VB Script.
Code:
<%
Response.Write(FormatDateTime(Date, vbGeneralDate))
Response.Write("<br />" & FormatDateTime(Date, vbLongDate))
Response.Write("<br />" & FormatDateTime(Date, vbShortDate))
Response.Write("<br />" & FormatDateTime(Now(), vbLongTime))
Response.Write("<br />" & FormatDateTime(Now(), vbShortTime))
%>
See working example:
Keywords:
ASP: Response.Write
VBScript: FormatDateTime, Date, Now
|