|
StrToDateTime(const AnsiString S) 라는 함수가 있네요.
근데, S에 잘못된 date/time format이 지정되면 EConvertError 에러를 뱉어 낸다고 되어 있네요.
도움말을 참고하세요.
아래는 도움말 원문입니다.
Converts an AnsiString object to a TDateTime object.
extern PACKAGE System::TDateTime __fastcall StrToDateTime(const AnsiString S);
Description
Call StrToDateTime to parse a string that specifies a date and time value. If S does not contain a valid date, StrToDateTime throws an EConvertError exception.
The S parameter must use the current locale뭩 date/time format. In the US, this is commonly MM/DD/YY HH:MM:SS format. Specifying AM or PM as part of the time is optional, as are the seconds. Use 24-hour time (7:45 PM is entered as 19:45, for example) if AM or PM is not specified.
Y2K issue: The conversion of two-digit year values is determined by the TwoDigitYearCenturyWindow variable. For more information, see StrToDate.
Note: The format of the date and time string varies when the values of date/time formatting variables are changed.
|