DateUtils.DateOf
From RAD Studio VCL Reference
Contents |
Delphi Information
From DateUtils.pas
function DateOf(const AValue: TDateTime): TDateTime;
Unit: DateUtils
Type: function
Visibility: public
C++ Information
From DateUtils.hpp
System::TDateTime __fastcall DateOf(System::TDateTime AValue);
Unit: DateUtils
Type: function
Description
Strips the time portion from a TDateTime value.
Call DateOf to convert a TDateTime value to a TDateTime value that includes only the date information (sets the time portion to 0, which means midnight).
Note: DateOf can yield an invalid result for TDateTime values that were manually calculated (using Arithmetics). In such a case, it is recommended to round the value (ex. DateOf(RoundTo(Value, -8))) prior to calling the DateOf routine.
See Also
Code Samples