[Overview][Constants][Procedures and functions] | Reference for unit 'dateutils' (#rtl) |
Extracts the day of the week from a DateTime value
Source position: dateutil.inc line 199
function DayOfTheWeek( |
const AValue: TDateTime |
):Word; |
AValue |
|
DateTime 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 DateTime 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.
No notes exist for this page yet.