20-05-2020, 06:43 AM
استعمل الدالة DecodeDateTime
كمثال
var
myDate : TDateTime;
myYear, myMonth, myDay : Word;
begin
myDate := StrToDate('29/12/2000');
myDate := IncMonth(myDate);
DecodeDate(myDate, myYear, myMonth, myDay);
ShowMessage('myDate now = '+DateToStr(myDate));
ShowMessage('myDay = '+IntToStr(myDay));
ShowMessage('myMonth = '+IntToStr(myMonth));
ShowMessage('myYear = '+IntToStr(myYear));
end;
كمثال
var
myDate : TDateTime;
myYear, myMonth, myDay : Word;
begin
myDate := StrToDate('29/12/2000');
myDate := IncMonth(myDate);
DecodeDate(myDate, myYear, myMonth, myDay);
ShowMessage('myDate now = '+DateToStr(myDate));
ShowMessage('myDay = '+IntToStr(myDay));
ShowMessage('myMonth = '+IntToStr(myMonth));
ShowMessage('myYear = '+IntToStr(myYear));
end;
وقل ربي زدني علماً

