;This script will calculate the Nth weekday of any month. Just replace the numbers for $Year, $Month, $Week, and $Weekday with numbers of your choice,
;Some lines are not really needed but are there to allow testing and proofing. It is based on Excel formula.
#include <Date.au3>
Global $tmp, $Year = "2019", $Month = "2", $Week = 2, $WeekDay = 4
Global $aNth = StringSplit("First ,Second ,Third ,Fourth ,Fifth ", ",")
Func GetWeekDay($Week, $Year, $Month, $WeekDay)
Local $LastDay = 8 - $WeekDay, $EndDay = $Week * 7 + 1
$Month = $Month > 10 ? $Month : "0" & $Month
Local $iWday = _DateToDayOfWeek($YEAR, $Month, $LastDay)
Return $YEAR & "/" & $Month & "/" & $EndDay - $iWday
EndFunc
MsgBox(0,'',$aNth[$Week] & _DateDayOfWeek($WeekDay) & " of " & _DateToMonth($Month) & _
" " & $Year & " is " & GetWeekDay($Week, $Year, $Month, $WeekDay) )
GetNthWeekDay.au3