FormatDateTime
The FormatDateTime function will format a date and/or datetime
variable into one of several standard date formats that VBScript
supports.
Response.Write "Current Date: " & FormatDateTime(Now(), vbGeneralDate)
| ASP Variable |
Value |
Description |
| vbGeneralDate |
0 |
Uses the internal system settings to format the date |
| vbLongDate |
1 |
Creates a long date format such as: July 23, 2002 |
| vbShortDate |
2 |
Creates a short date in the format: 11/25/02 |
| vbLongTime |
3 |
Creates a long version of the time: 15:32:59 |
| vbShortTime |
4 |
13:21 |
|
 |

|