function IntegerToDate(const Date: Integer): TDateTime
procedure checkdate(aValue: integer); var aDate: TDateTime; begin aDate := IntegerToDate(aValue); message_dlg(FormatDateTime('dd.mm.yyyy', aDate)); end;