StartOfTheDay function
Calculate the start of the day as a TDateTime value, given a moment in the day.
Declaration
function StartOfTheDay(const AValue: TDateTime): TDateTimeArguments
AValue | TDateTime from which to calculate start of the day. |
Function result
Start of the day (00:00) as a
TDateTime value.
Description
StartOfTheDay extracts the date part of
AValue and
returns a
TDateTime value with the date/time indication of
the start (0:0:0.000) of this day.
See also
- StartOfADay
- StartOfTheWeek
- StartOfAWeek
- StartOfAMonth
- StartOfTheMonth
- EndOfTheWeek
- EndOfAWeek
- EndOfTheYear
- EndOfAYear
- EndOfTheMonth
- EndOfAMonth
- EndOftheDay
- EndOfADay
Example: ex36
Program Example36;
{ This program demonstrates the StartOfTheDay function }
Uses SysUtils,DateUtils;
Const
Fmt = '"Start of the day : "dd mmmm yyyy hh:nn:ss';
Begin
Writeln(FormatDateTime(Fmt,StartOfTheDay(Today)));
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
