RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.WithinPastMinutes Function

Indicates whether two date/time values are within a specified number of minutes of each other.

Pascal
function WithinPastMinutes(const ANow: TDateTime; const AThen: TDateTime; const AMinutes: Int64): Boolean;
C++
Boolean WithinPastMinutes(const TDateTime ANow, const TDateTime AThen, const Int64 AMinutes);

DateUtils

Call WithinPastMinutes to determine whether the date and time specified by ANow is within AMinutes minutes of the date and time specified by AThen.

Note: WithinPastMinutes uses the MinutesBetween function, which means that fractional minutes do not count. If ANow and AThen are 2 and a half minutes apart, calling WithinPastMinutes with AMinutes set to 2 returns true.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!