RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.SameTime Function

Indicates whether two TDateTime values represent the same time of day, ignoring the date portion.

Pascal
function SameTime(const A: TDateTime; const B: TDateTime): Boolean;
C++
Boolean SameTime(const TDateTime A, const TDateTime B);

Call SameTime to determine whether the two TDateTime values specified by A and B represent the same time of day, ignoring the date portion. SameTime returns true if the two specified values occur on the same hour, minute, second, and millisecond, false otherwise.

Note: It is possible to create two TDateTime values whose time portions differ numerically when viewed as floating point types, but which represent the same hour, minute, second, and millisecond. SameTime allows applications to determine when two TDateTime values represent the same time, even when the fractional parts of the values differ.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!