11-02-2014, 04:25 PM
حاول بالملف المرفق
المحتوى:
المحتوى:
كود :
function IsValidDateCheck(const AValue: String): Boolean;
var
dtTemp: TDateTime;
begin
Result := False;
if Length(AValue) = 10 then
if (AValue[3] = '/') and (AValue[6] = '/') then
Result := TryStrToDate(AValue, dtTemp);
end;
procedure TForm2.Button1Click(Sender: TObject);
var tempstr:string;
begin
tempstr:=Edit1.Text;
if IsValidDateCheck(tempStr) then
ShowMessage(tempStr + ' is a valid date.')
else
ShowMessage(tempStr + ' is not a valid date.');
end;
أدبني الدهر فأراني نقص عقلي وإذا ما ازددت علما زادني علما بجهلي

