value.FormatDate
Description
Description
Returns string representation of a date value, formatted according to the format specified.
Syntax
Syntax
Function FormatDate(format, time)
Parameters
Parameters
format (input) - the format of the date
time (input) - a boolean if you want to include the time
Return value
Return value
string - representation of the date value in the given format
Example
Sample code
Dim val
UserVar.value = CDate( "11/16/2005 13:34:12" )
val = UserVar.FormatDate( "DDDD, MMMM DD, YYYY" ) ' the return value: Wednesday, November 16, 2005
val = UserVar.FormatDate( "MM/DD/YYYY h:m:s p" ) ' the return value: 11/16/2005 1:34:12 PM
See also