System.DateUtils.WithinPastSeconds
Delphi
function WithinPastSeconds(const ANow, AThen: TDateTime; const ASeconds: Int64): Boolean;
C++
extern DELPHI_PACKAGE bool __fastcall WithinPastSeconds(const System::TDateTime ANow, const System::TDateTime AThen, const __int64 ASeconds);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.DateUtils.pas System.DateUtils.hpp |
System.DateUtils | System.DateUtils |
Description
Indicates whether two date/time values are within a specified number of seconds of each other.
Call WithinPastSeconds to determine whether the date and time specified by ANow is within ASeconds seconds of the date and time specified by AThen.
Note: WithinPastSeconds uses the SecondsBetween function, which means that fractional seconds do not count. If ANow and AThen are two and a half seconds apart, calling WithinPastSeconds with ASeconds set to 2 returns True.
See Also