StrToTime
Converts a string to a TDateTime value.
Structure
StrToTime(string): TDateTime;
Parameters
Return Value
Description
Call StrToTime to parse a string that specifies a time value. If S does not contain a valid time, StrToTime raises an EConvertError exception.
The S parameter must consist of two or three numbers, separated by the character defined by the TimeSeparator global variable, optionally followed by an AM or PM indicator. The numbers represent hour, minute, and (optionally) second, in that order. If the time is followed by AM or PM, it is assumed to be in 12-hour clock format. If no AM or PM indicator is included, the time is assumed to be in 24-hour clock format.
Note
The format of the date and time string varies when the values of date/time formatting variables are changed. |