Public Function ParseDateTime( _
ByVal vDateTime As Variant _
, ByVal vFormat As Variant _
) As Variant ParseDateTime("20561023", "yyyymmdd") = #10/23/2056#
ParseDateTime("130545", "hhnnss") = #13:05:45#
ParseDateTime("1305", "hhnn") = #13:05:00#
ParseDateTime("03:45:29 07/08/95", "hh nn ss mm dd yy") = #7/8/95 3:45:29#See also: CDate Function (Visual Basic)
CVDate Function (Visual Basic)
Format Function (Visual Basic)vDateTime: The string whose individual parts are interpreted as the components of a date and/or time value according to the format provided in vFormat. Function returns Null if vDate is Null or cannot be fixed up to a String. Y: Year
M: Month
D: Day
H: Hour
N: Minute
S: SecondReturn value: The function must find year, month, and day components for it to return a date value. If the function finds valid hour, minute, OR seconds components, it will return a date which has a time component. Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.