StartOfADay function
Returns the start of a day as a
TDateTime value, given a day indication.
Declaration
function StartOfADay(const AYear: Word; const AMonth: Word;
const ADay: Word): TDateTime; overloadArguments
AYear | Year. |
AMonth | Month in the year. |
ADay | Day in the month. |
Function result
Start of the given day as TDateTime.
Description
StartOfADay
returns a
TDateTime value with the date/time indication of
the start (0:0:0.000) of the day given by
AYear,
AMonth,
ADay.
The day may also be indicated with a AYear, ADayOfYear pair.
See also
- StartOfTheDay
- StartOfTheWeek
- StartOfAWeek
- StartOfAMonth
- StartOfTheMonth
- EndOfTheWeek
- EndOfAWeek
- EndOfTheYear
- EndOfAYear
- EndOfTheMonth
- EndOfAMonth
- EndOfTheDay
- EndOfADay
Example: ex38
Program Example38;
{ This program demonstrates the StartOfADay function }
Uses SysUtils,DateUtils;
Const
Fmt = '"Start of the day : "dd mmmm yyyy hh:nn:ss';
Var
Y,M,D : Word;
Begin
Y:=YearOf(Today);
M:=MonthOf(Today);
D:=DayOf(Today);
Writeln(FormatDateTime(Fmt,StartOfADay(Y,M,D)));
DecodeDateDay(Today,Y,D);
Writeln(FormatDateTime(Fmt,StartOfADay(Y,D)));
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
