DateUtils.DayOfTheWeek
From RAD Studio VCL Reference
Contents |
Delphi Information
From DateUtils.pas
function DayOfTheWeek(const AValue: TDateTime): Word;
Unit: DateUtils
Type: function
Visibility: public
C++ Information
From DateUtils.hpp
unsigned short __fastcall DayOfTheWeek(System::TDateTime AValue);
Unit: DateUtils
Type: function
Description
Returns the day of the week represented by a TDateTime value.
Call DayOfTheWeek to obtain the day of the week represented by a specified TDateTime value. DayOfTheWeek returns a value from 1 through 7, where 1 indicates Monday and 7 indicates Sunday.
Note: DayOfTheWeek is ISO 8601 compliant (where Monday is considered the first day of the week). To obtain the day of the week, where Sunday is considered the first day of the week, use the DayOfWeek function instead.
Tip: To make the return value more readable, use the day of week constants.
See Also
Code Samples