16-09-2016, 08:08 AM
السلام عليكم
PHP كود :
var
d1,m1,y1: word;
d2,m2,y2: word; result:integer;
Myfirstdate,Myseconddate: TDateTime;
begin
Myfirstdate:=EncodeDate(2000,09,16);
Myseconddate:=Now;
decodedate(Myfirstdate,y1,m1,d1);
decodedate(Myseconddate,y2,m2,d2);
result:=(m2-m1)+(y2-y1)*12;
ShowMessage('diffmonth = '+IntToStr(result));
end;
أدبني الدهر فأراني نقص عقلي وإذا ما ازددت علما زادني علما بجهلي


![[-]](https://delphi4arab.net/forum/D4A2020/collapse.png)