Jump to content

Search the Community

Showing results for tags 'week number'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. ;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
×
×
  • Create New...