function DateExists(Date: string; Separator: char): Boolean; var OldDateSeparator: Char; begin Result := True; OldDateSeparator := DateSeparator; DateSeparator := Separator; try try StrToDate(Date); except Result := False; end; finally DateSeparator := OldDateSeparator; end; end;
procedure TForm1.FormCreate(Sender: TObject); begin if DateExists('35.3.2001', '.') then begin {your code} end; end; Взято с Delphi Knowledge Base http://www.baltsoft.com/