Parses a string to read a date/time value.
bool ParseDateTime( LPCTSTR lpszDate, DWORD dwFlags = 0, LCID lcid = LANG_USER_DEFAULT ) throw( );
If the string was successfully converted to a date/time value, the value of this COleDateTime object is set to that value and its status to valid.
Year values must lie between 100 and 9999, inclusively.
The lpszDate parameter can take a variety of formats. For example, the following strings contain acceptable date/time formats:
"25 January 1996"
"January 25, 1996 8:30:00"
"8:30:00 Jan. 25, 1996"
"1/25/1996 8:30:00" // always specify the full year,
// even in a 'short date' format
Note that the locale ID will also affect whether the string format is acceptable for conversion to a date/time value.
In the case of VAR_DATEVALUEONLY, the time value is set to time 0, or midnight. In the case of VAR_TIMEVALUEONLY, the date value is set to date 0, meaning 30 December 1899.
If the string could not be converted to a date/time value or if there was a numerical overflow, the status of this COleDateTime object is invalid.
For more information about the bounds and implementation for COleDateTime values, see the article Date and Time: Automation Support.