FormatDateTime

Format a Date/Time value.
Syntax
FormatDateTime(date [,format] )

Key
date A date or a string that can be interpreted as a date.

format The date format: vbGeneralDate (0), vbLongDate (1), vbShortDate (2), vbLongTime (3), vbShortTime (4).

Example
WScript.Echo FormatDateTime("12/25/10",vbLongDate)

“We all have our time machines. Some take us back, they're called memories. Some take us forward, they're called dreams” - Jeremy Irons

Related:

FormatCurrency - Format a number with a currency symbol
FormatNumber - Format a number
FormatPercent - Format a number with a % symbol
Equivalent Powershell command: $myvar = (get-date).tolongDatestring() Also: .toshortDatestring .tolongTimestring .toshortTimestring 

Make a Free Website with Yola.