RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.SameDateTime Function

Indicates whether two TDateTime values represent the same year, month, day, hour, minute, second, and millisecond.

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

Call SameDateTime to determine whether the two TDateTime values specified by A and B represent the same time, down to the millisecond. SameDateTime returns true if the two specified values represent the same time, false otherwise.

Note: It is possible to create two TDateTime values that differ numerically when viewed as floating point types, but which represent the same year, month, day, hour, minute, second, and millisecond. SameDateTime allows applications to determine when two TDateTime values are the same even when their numeric values differ.
 

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