| [Overview][Constants][Procedures and functions][Index] | 
Extracts the day of the week from a TDateTime value
Source position: dateutil.inc line 214
function DayOfTheWeek(  | 
const AValue: TDateTime  | 
):Word;  | 
AValue  | 
  | 
TDateTime to extract the day of the week from.  | 
Day of the week from AValue.
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.
  | 
Extracts the day of the year from a TDateTime value  | 
|
  | 
Extract the day (of month) part of a TDateTime value  | 
|
  | 
Calculate the number of hours elapsed since the start of the week.  | 
|
  | 
Calculate the number of minutes elapsed since the start of the week  | 
|
  | 
Calculate the number of seconds elapsed since the start of the week  | 
|
  | 
Calculate the number of milliseconds elapsed since the start of the week  | 
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.