DayOfTheWeek function
Extracts the day of the week from a TDateTime value.
Declaration
function DayOfTheWeek(const AValue: TDateTime): WordArguments
AValue | TDateTime to extract the day of the week from. |
Function result
Day of the week from
AValue.
Description
DayOfTheWeek returns the number of days that have passed since
the start of the week till the moment indicated by
AValue. This is a one-based number, i.e. the first day of the
week will return 1.
See also
Example: ex42
Program Example42;
{ This program demonstrates the WeekOfTheMonth function }
Uses SysUtils,DateUtils;
Var
N : TDateTime;
Begin
N:=Now;
Writeln('Day of the Week : ',DayOfTheWeek(N));
Writeln('Hour of the Week : ',HourOfTheWeek(N));
Writeln('Minute of the Week : ',MinuteOfTheWeek(N));
Writeln('Second of the Week : ',SecondOfTheWeek(N));
Writeln('MilliSecond of the Week : ',
MilliSecondOfTheWeek(N));
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
