The DateOf function strips the time portion from a TDateTime value, by extracting the date part from the parameter AValue and returning the result.
The time portion of AValue is set to 00:00:00 - or midnight, and excluded.
Declaration: Function DateOf(const AValue: TDateTime): TDateTime;
An example follows.
Please also see Date which performs a similar function.