Returns the weekday number for a given date
#include <Date.au3>
_DateToDayOfWeek ( $iYear, $iMonth, $iDay )
$iYear | A valid year in format YYYY |
$iMonth | A valid month in format MM |
$iDay | A valid day in format DD |
Success: | the day of the Week Range is 1 to 7 where 1=Sunday. |
Failure: | 0 and sets the @error flag to non-zero. |
@error: | 1 - Invalid Input Date |
_DateAdd, _DateDayOfWeek, _DateDiff, _DateToDayOfWeekISO, _DayValueToDate
#include <Date.au3>
#include <MsgBoxConstants.au3>
; Week day number for a given date
Local $iWeekday = _DateToDayOfWeek(@YEAR, @MON, @MDAY)
; Should be equal to @WDAY
MsgBox($MB_SYSTEMMODAL, "", "Todays WeekdayNumber is: " & $iWeekday)
MsgBox($MB_SYSTEMMODAL, "", "Today is a : " & _DateDayOfWeek($iWeekday))