Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
type TDateTime = type Double;
function DayOfWeek(Date: TDateTime): integer;
Returns the day of the week for a given date.
DayOfWeek returns an integer between 1 and 7, where Sunday is the first day of the week and Saturday is the seventh.
DayOfTheWeek is not compliant with the ISO 8601 standard.
const Days: array[1..7] of string =
('Sunday', 'Monday', 'Tuesday',
'Wednesday', 'Thursday',
'Friday', 'Saturday')
ShowMessage('Today is ' + Days[DayOfWeek(Date)]);
//Today is Monday
|
DayOfTheWeek,
TDateTime,
Date,
|
Free Delphi code snippet inside every Delphi Newsletter! |
|
|
|
Got some code to share? Got a question? Need some help? |
|
|