procedure TForm1.Button1Click(Sender: TObject);
var tgl1,tgl2:tdatetime;
thn,bln,hari,tempo:word;
begin
tgl1:=strtodate('1/1/2010');
tempo:=5;
decodedate(tgl1,thn,bln,hari);
bln:=bln+tempo;
if bln>12 then
begin
bln:=bln-12;
thn:=thn+1;
end;
tgl2:= encodedate(thn,bln,hari);
showmessage('Tanggal jatuh tempo '+formatdatetime('dd/mm/yyyy',tgl2));
end;
makasih sob, sukses nih coding-nya ^^
BalasHapus