[Lazarus] Detecting X minutes ago.

Michael Van Canneyt michael at freepascal.org
Mon Jun 1 16:06:19 CEST 2015



On Mon, 1 Jun 2015, Richard Mace wrote:

> Hi All,
> What's the best way of detecting what Now - 5 minutes is?
> Effectively, I want to do the following:
> 
> 5MinsAgo: TDateTime;
> 
> 5MinsAgo := Now -5 minutes?

Uses DateUtils;

Var
   N : TDateTime;

begin
   N:=Now;
   N:=IncMinutes(N,-5);
end;

Or somesuch.

Michael.




More information about the Lazarus mailing list