RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.DayOfTheWeek Function

Returns the day of the week represented by a TDateTime value.

Pascal
function DayOfTheWeek(const AValue: TDateTime): Word;
C++
Word DayOfTheWeek(const TDateTime AValue);

DateUtils

Call DayOfTheWeek to obtain the day of the week represented by a specified TDateTime value. DayOfTheWeek returns a value between 1 and 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.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!