RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.SecondsBetween Function

Returns the number of seconds between two specified TDateTime values.

Pascal
function SecondsBetween(const ANow: TDateTime; const AThen: TDateTime): Int64;
C++
Int64 SecondsBetween(const TDateTime ANow, const TDateTime AThen);

DateUtils

Call SecondsBetween to obtain the difference, in seconds, between two TDateTime values. SecondsBetween counts only entire seconds. Thus, SecondsBetween reports the difference between 9:00:00 AM and 9:00:00:999 AM as 0 because the difference is one millisecond short of an entire second. 

 

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