CodePudding user response:
The former title, the database related tables, open:[code=dellphi]
Var D: TDateTime;
L: integer;
The begin
D:=ClientDataSet1 FieldByName (' time '). AsDateTime;
.///D:=ADOQuery1 FieldByName (' time '). AsDateTime;
L:=Trunc (Now - D);
If L> 0 then ShowMessage (' has' + IntToStr (L) + 'day! ')
The else ShowMessage (' worse '+ IntToStr (L) +' day! ');
end;
[/code]
CodePudding user response:
The former title, the database related tables, open:
Var D: TDateTime;
L: integer;
The begin
D:=ClientDataSet1 FieldByName (' time '). AsDateTime;
.///D:=ADOQuery1 FieldByName (' time '). AsDateTime;
L:=Trunc (Now - D);
If L> 0 then ShowMessage (' has' + IntToStr (L) + 'day! ')
The else ShowMessage (' worse '+ IntToStr (L) +' day! ');
end;
CodePudding user response:
MinutesBetween, bring their own functionCodePudding user response:
USES DateUtils;
DaysBetween (Now (), date1)
CodePudding user response: