Format a Date/Time value.
Syntax
FormatDateTime(date [,format] )
Key
date A date or a string that can be interpreted as a date.
The values accepted are dependent on the regional settings
of the current user.
format The date format: vbGeneralDate (0), vbLongDate (1), vbShortDate (2), vbLongTime (3), vbShortTime (4).
Example
WScript.Echo FormatDateTime("2012/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
DatePart - Return part of a given date
Standard date and time notation - YYYY-MM-DD
Equivalent PowerShell cmdlet: $myvar = (get-date).tolongDatestring() Also: .toshortDatestring .tolongTimestring .toshortTimestring