Next or Previous Xth Weekday of the Month in Power Apps
In this blog post I will be looking at how to get the Next or Previous Xth Weekday of the Month in Power Apps.
When utilising dates and potentially while we are looking at repetitive meetings or other kind of unique dates, we will need to get, for example, the next 2nd Tuesday or the previous third Thursday, i.e. the Xth Weekday of the Month, based on a month chosen in a datepicker.
We will be putting all of the info we gather into a label but you could remove the excess code and use the derived date in any control or collection or function that you need.
The First day of the Month
Let’s start with something simple – getting the first day of the month.
Insert a datepicker, let’s call it dat_OriginalMeetingDate_HS (_HS as its on my Home Screen).
Now insert a new label, and make it’s Text property:
With(
{
FirstOfMonth:
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
)
},
"The First Date of this month is: " & FirstOfMonth
)
The First day of this Month, Last Month and Next Month
Ok great, now we can expand on that Formula to get the First day of the Previous Month and the First day of the Next Month:
With(
{
FirstOfMonth:
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
FirstOfPrevMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
-1,
Months
),
FirstOfNextMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
1,
Months
)
},
"The First Date of this month is: " & FirstOfMonth & Char(10) &
"The First Date of last month is: " & FirstOfPrevMonth & Char(10) &
"The First Date of next month is: " & FirstOfNextMonth & Char(10)
)
Fantastic, now if you choose a date in your datepicker, you should see this:

Note how when we use DateAdd, the resulting output is a DateTime, whereas constructing it using Date( Year, Month, Day) results in a Date without a time.
The First Monday of this Month, last Month and next Month
Ok, so we’ve got the DATES of the first days, but how do we get the first DAY of a particular type?
We look at using one of the datetime functions to determine the Weekday of the first day, then add the days based on that:
With(
{
FirstOfMonth:
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
FirstOfPrevMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
-1,
Months
),
FirstOfNextMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
1,
Months
),
WeekLength: 7
},
With(
{
// We start on Tuesday so that Monday is day 7
// this helps our formula below which uses 7 for the WeekLength
DayOfWeekFirstOfMonthMonday: Weekday(FirstOfMonth, StartOfWeek.Tuesday),
DayOfWeekPrevFirstOfMonthMonday: Weekday(FirstOfPrevMonth, StartOfWeek.Tuesday),
DayOfWeekNextFirstOfMonthMonday: Weekday(FirstOfNextMonth, StartOfWeek.Tuesday),
First: 1,
Second: 2,
Third: 3,
Fourth: 4
},
With(
{
FirstMonday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthMonday)),
FirstMondayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthMonday)),
FirstMondayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthMonday))
},
"The First Monday of this month is: " & FirstMonday & Char(10) &
"The First Monday of last month is: " & FirstMondayPrevMonth & Char(10) &
"The First Monday of next month is: " & FirstMondayNextMonth & Char(10)
)
)
)

The First, Second, Third and Fourth Monday of this Month, last Month and next Month
We can expand this further to get the first, second, third and fourth Monday of this Month, last Month and next Month.
With(
{
FirstOfMonth:
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
FirstOfPrevMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
-1,
Months
),
FirstOfNextMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
1,
Months
),
WeekLength: 7
},
With(
{
// We start on Tuesday so that Monday is day 7
// this helps our formula below which uses 7 for the WeekLength
DayOfWeekFirstOfMonth: Weekday(FirstOfMonth, StartOfWeek.Tuesday),
DayOfWeekPrevFirstOfMonth: Weekday(FirstOfPrevMonth, StartOfWeek.Tuesday),
DayOfWeekNextFirstOfMonth: Weekday(FirstOfNextMonth, StartOfWeek.Tuesday),
First: 1,
Second: 2,
Third: 3,
Fourth: 4
},
With(
{
FirstMonday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonth)),
FirstMondayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonth)),
FirstMondayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonth)),
SecondMonday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonth)),
SecondMondayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonth)),
SecondMondayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonth)),
ThirdMonday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonth)),
ThirdMondayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonth)),
ThirdMondayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonth)),
FourthMonday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonth)),
FourthMondayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonth)),
FourthMondayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonth))
},
"The First Monday of this month is: " & FirstMonday & Char(10) &
"The First Monday of last month is: " & FirstMondayPrevMonth & Char(10) &
"The First Monday of next month is: " & FirstMondayNextMonth & Char(10) &
"The Second Monday of this month is: " & SecondMonday & Char(10) &
"The Second Monday of last month is: " & SecondMondayPrevMonth & Char(10) &
"The Second Monday of next month is: " & SecondMondayNextMonth & Char(10) &
"The Third Monday of this month is: " & ThirdMonday & Char(10) &
"The Third Monday of last month is: " & ThirdMondayPrevMonth & Char(10) &
"The Third Monday of next month is: " & ThirdMondayNextMonth & Char(10) &
"The Fourth Monday of this month is: " & FourthMonday & Char(10) &
"The Fourth Monday of last month is: " & FourthMondayPrevMonth & Char(10) &
"The Fourth Monday of next month is: " & FourthMondayNextMonth & Char(10)
)
)
)

The First, Second, Third and Fourth Monday and Tuesday of this Month, last Month and next Month
We can make a very small addition to the formula to include Tuesday (and by extension the rest of the days of the week):
With(
{
FirstOfMonth:
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
FirstOfPrevMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
-1,
Months
),
FirstOfNextMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
1,
Months
),
WeekLength: 7
},
With(
{
// We start on Tuesday so that Monday is day 7
// this helps our formula below which uses 7 for the WeekLength
DayOfWeekFirstOfMonthMonday: Weekday(FirstOfMonth, StartOfWeek.Tuesday),
DayOfWeekPrevFirstOfMonthMonday: Weekday(FirstOfPrevMonth, StartOfWeek.Tuesday),
DayOfWeekNextFirstOfMonthMonday: Weekday(FirstOfNextMonth, StartOfWeek.Tuesday),
//Then we cycle this for the other days so that the Start of week is the day after
DayOfWeekFirstOfMonthTuesday: Weekday(FirstOfMonth, StartOfWeek.Wednesday),
DayOfWeekPrevFirstOfMonthTuesday: Weekday(FirstOfPrevMonth, StartOfWeek.Wednesday),
DayOfWeekNextFirstOfMonthTuesday: Weekday(FirstOfNextMonth, StartOfWeek.Wednesday),
First: 1,
Second: 2,
Third: 3,
Fourth: 4
},
With(
{
FirstMonday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthMonday)),
FirstMondayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthMonday)),
FirstMondayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthMonday)),
SecondMonday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonthMonday)),
SecondMondayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonthMonday)),
SecondMondayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonthMonday)),
ThirdMonday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonthMonday)),
ThirdMondayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonthMonday)),
ThirdMondayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthMonday)),
FourthMonday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonthMonday)),
FourthMondayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonthMonday)),
FourthMondayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonthMonday)),
FirstTuesday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthTuesday)),
FirstTuesdayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthTuesday)),
FirstTuesdayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthTuesday)),
SecondTuesday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonthTuesday)),
SecondTuesdayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonthTuesday)),
SecondTuesdayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonthTuesday)),
ThirdTuesday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonthTuesday)),
ThirdTuesdayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonthTuesday)),
ThirdTuesdayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthTuesday)),
FourthTuesday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonthTuesday)),
FourthTuesdayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonthTuesday)),
FourthTuesdayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonthTuesday))
},
"The First Monday of this month is: " & FirstMonday & Char(10) &
"The First Monday of last month is: " & FirstMondayPrevMonth & Char(10) &
"The First Monday of next month is: " & FirstMondayNextMonth & Char(10) &
"The Second Monday of this month is: " & SecondMonday & Char(10) &
"The Second Monday of last month is: " & SecondMondayPrevMonth & Char(10) &
"The Second Monday of next month is: " & SecondMondayNextMonth & Char(10) &
"The Third Monday of this month is: " & ThirdMonday & Char(10) &
"The Third Monday of last month is: " & ThirdMondayPrevMonth & Char(10) &
"The Third Monday of next month is: " & ThirdMondayNextMonth & Char(10) &
"The Fourth Monday of this month is: " & FourthMonday & Char(10) &
"The Fourth Monday of last month is: " & FourthMondayPrevMonth & Char(10) &
"The Fourth Monday of next month is: " & FourthMondayNextMonth & Char(10) &
"The First Tuesday of this month is: " & FirstTuesday & Char(10) &
"The First Tuesday of last month is: " & FirstTuesdayPrevMonth & Char(10) &
"The First Tuesday of next month is: " & FirstTuesdayNextMonth & Char(10) &
"The Second Tuesday of this month is: " & SecondTuesday & Char(10) &
"The Second Tuesday of last month is: " & SecondTuesdayPrevMonth & Char(10) &
"The Second Tuesday of next month is: " & SecondTuesdayNextMonth & Char(10) &
"The Third Tuesday of this month is: " & ThirdTuesday & Char(10) &
"The Third Tuesday of last month is: " & ThirdTuesdayPrevMonth & Char(10) &
"The Third Tuesday of next month is: " & ThirdTuesdayNextMonth & Char(10) &
"The Fourth Tuesday of this month is: " & FourthTuesday & Char(10) &
"The Fourth Tuesday of last month is: " & FourthTuesdayPrevMonth & Char(10) &
"The Fourth Tuesday of next month is: " & FourthTuesdayNextMonth & Char(10)
)
)
)

All of the First, Second, Third and Fourth weekdays for this month, last month and next month
Now, I do not recommend you type out or use all of this code every time you are working with or trying to get the X Weekday of the Month, but I will provide the full Monday-Sunday code below as this is what you will extract your code from:
With(
{
FirstOfMonth:
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
FirstOfPrevMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
-1,
Months
),
FirstOfNextMonth:
DateAdd(
Date(
Year(dat_OriginalMeetingDate_HS.SelectedDate),
Month(dat_OriginalMeetingDate_HS.SelectedDate),
1
),
1,
Months
),
WeekLength: 7
},
With(
{
// We start on Tuesday so that Monday is day 7
// this helps our formula below which uses 7 for the WeekLength
DayOfWeekFirstOfMonthMonday: Weekday(FirstOfMonth, StartOfWeek.Tuesday),
DayOfWeekPrevFirstOfMonthMonday: Weekday(FirstOfPrevMonth, StartOfWeek.Tuesday),
DayOfWeekNextFirstOfMonthMonday: Weekday(FirstOfNextMonth, StartOfWeek.Tuesday),
//Then we cycle this for the other days so that the Start of week is the day after
DayOfWeekFirstOfMonthTuesday: Weekday(FirstOfMonth, StartOfWeek.Wednesday),
DayOfWeekPrevFirstOfMonthTuesday: Weekday(FirstOfPrevMonth, StartOfWeek.Wednesday),
DayOfWeekNextFirstOfMonthTuesday: Weekday(FirstOfNextMonth, StartOfWeek.Wednesday),
DayOfWeekFirstOfMonthWednesday: Weekday(FirstOfMonth, StartOfWeek.Thursday),
DayOfWeekPrevFirstOfMonthWednesday: Weekday(FirstOfPrevMonth, StartOfWeek.Thursday),
DayOfWeekNextFirstOfMonthWednesday: Weekday(FirstOfNextMonth, StartOfWeek.Thursday),
DayOfWeekFirstOfMonthThursday: Weekday(FirstOfMonth, StartOfWeek.Friday),
DayOfWeekPrevFirstOfMonthThursday: Weekday(FirstOfPrevMonth, StartOfWeek.Friday),
DayOfWeekNextFirstOfMonthThursday: Weekday(FirstOfNextMonth, StartOfWeek.Friday),
DayOfWeekFirstOfMonthFriday: Weekday(FirstOfMonth, StartOfWeek.Saturday),
DayOfWeekPrevFirstOfMonthFriday: Weekday(FirstOfPrevMonth, StartOfWeek.Saturday),
DayOfWeekNextFirstOfMonthFriday: Weekday(FirstOfNextMonth, StartOfWeek.Saturday),
DayOfWeekFirstOfMonthSaturday: Weekday(FirstOfMonth, StartOfWeek.Sunday),
DayOfWeekPrevFirstOfMonthSaturday: Weekday(FirstOfPrevMonth, StartOfWeek.Sunday),
DayOfWeekNextFirstOfMonthSaturday: Weekday(FirstOfNextMonth, StartOfWeek.Sunday),
DayOfWeekFirstOfMonthSunday: Weekday(FirstOfMonth, StartOfWeek.Monday),
DayOfWeekPrevFirstOfMonthSunday: Weekday(FirstOfPrevMonth, StartOfWeek.Monday),
DayOfWeekNextFirstOfMonthSunday: Weekday(FirstOfNextMonth, StartOfWeek.Monday),
First: 1,
Second: 2,
Third: 3,
Fourth: 4
},
With(
{
FirstMonday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthMonday)),
FirstMondayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthMonday)),
FirstMondayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthMonday)),
SecondMonday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonthMonday)),
SecondMondayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonthMonday)),
SecondMondayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonthMonday)),
ThirdMonday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonthMonday)),
ThirdMondayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonthMonday)),
ThirdMondayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthMonday)),
FourthMonday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonthMonday)),
FourthMondayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonthMonday)),
FourthMondayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonthMonday)),
FirstTuesday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthTuesday)),
FirstTuesdayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthTuesday)),
FirstTuesdayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthTuesday)),
SecondTuesday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonthTuesday)),
SecondTuesdayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonthTuesday)),
SecondTuesdayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonthTuesday)),
ThirdTuesday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonthTuesday)),
ThirdTuesdayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonthTuesday)),
ThirdTuesdayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthTuesday)),
FourthTuesday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonthTuesday)),
FourthTuesdayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonthTuesday)),
FourthTuesdayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonthTuesday)),
FirstWednesday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthWednesday)),
FirstWednesdayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthWednesday)),
FirstWednesdayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthWednesday)),
SecondWednesday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonthWednesday)),
SecondWednesdayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonthWednesday)),
SecondWednesdayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonthWednesday)),
ThirdWednesday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonthWednesday)),
ThirdWednesdayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonthWednesday)),
ThirdWednesdayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthWednesday)),
FourthWednesday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonthWednesday)),
FourthWednesdayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonthWednesday)),
FourthWednesdayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonthWednesday)),
FirstThursday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthThursday)),
FirstThursdayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthThursday)),
FirstThursdayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthThursday)),
SecondThursday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonthThursday)),
SecondThursdayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonthThursday)),
SecondThursdayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonthThursday)),
ThirdThursday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonthThursday)),
ThirdThursdayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonthThursday)),
ThirdThursdayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthThursday)),
FourthThursday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonthThursday)),
FourthThursdayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonthThursday)),
FourthThursdayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonthThursday)),
FirstFriday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthFriday)),
FirstFridayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthFriday)),
FirstFridayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthFriday)),
SecondFriday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonthFriday)),
SecondFridayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonthFriday)),
SecondFridayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonthFriday)),
ThirdFriday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonthFriday)),
ThirdFridayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonthFriday)),
ThirdFridayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthFriday)),
FourthFriday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonthFriday)),
FourthFridayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonthFriday)),
FourthFridayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonthFriday)),
FirstSaturday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthSaturday)),
FirstSaturdayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthSaturday)),
FirstSaturdayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthSaturday)),
SecondSaturday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonthSaturday)),
SecondSaturdayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonthSaturday)),
SecondSaturdayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonthSaturday)),
ThirdSaturday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonthSaturday)),
ThirdSaturdayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonthSaturday)),
ThirdSaturdayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthSaturday)),
FourthSaturday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonthSaturday)),
FourthSaturdayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonthSaturday)),
FourthSaturdayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonthSaturday)),
FirstSunday: DateAdd( FirstOfMonth, (First * WeekLength) - (DayOfWeekFirstOfMonthSunday)),
FirstSundayPrevMonth: DateAdd( FirstOfPrevMonth, (First * WeekLength) - (DayOfWeekPrevFirstOfMonthSunday)),
FirstSundayNextMonth: DateAdd( FirstOfNextMonth, (First * WeekLength) - (DayOfWeekNextFirstOfMonthSunday)),
SecondSunday: DateAdd( FirstOfMonth, (Second * WeekLength) - (DayOfWeekFirstOfMonthSunday)),
SecondSundayPrevMonth: DateAdd( FirstOfPrevMonth, (Second * WeekLength) - (DayOfWeekPrevFirstOfMonthSunday)),
SecondSundayNextMonth: DateAdd( FirstOfNextMonth, (Second * WeekLength) - (DayOfWeekNextFirstOfMonthSunday)),
ThirdSunday: DateAdd( FirstOfMonth, (Third * WeekLength) - (DayOfWeekFirstOfMonthSunday)),
ThirdSundayPrevMonth: DateAdd( FirstOfPrevMonth, (Third * WeekLength) - (DayOfWeekPrevFirstOfMonthSunday)),
ThirdSundayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthSunday)),
FourthSunday: DateAdd( FirstOfMonth, (Fourth * WeekLength) - (DayOfWeekFirstOfMonthSunday)),
FourthSundayPrevMonth: DateAdd( FirstOfPrevMonth, (Fourth * WeekLength) - (DayOfWeekPrevFirstOfMonthSunday)),
FourthSundayNextMonth: DateAdd( FirstOfNextMonth, (Fourth * WeekLength) - (DayOfWeekNextFirstOfMonthSunday))
},
"The First Monday of this month is: " & FirstMonday & Char(10) &
"The First Monday of last month is: " & FirstMondayPrevMonth & Char(10) &
"The First Monday of next month is: " & FirstMondayNextMonth & Char(10) &
"The Second Monday of this month is: " & SecondMonday & Char(10) &
"The Second Monday of last month is: " & SecondMondayPrevMonth & Char(10) &
"The Second Monday of next month is: " & SecondMondayNextMonth & Char(10) &
"The Third Monday of this month is: " & ThirdMonday & Char(10) &
"The Third Monday of last month is: " & ThirdMondayPrevMonth & Char(10) &
"The Third Monday of next month is: " & ThirdMondayNextMonth & Char(10) &
"The Fourth Monday of this month is: " & FourthMonday & Char(10) &
"The Fourth Monday of last month is: " & FourthMondayPrevMonth & Char(10) &
"The Fourth Monday of next month is: " & FourthMondayNextMonth & Char(10) &
"The First Tuesday of this month is: " & FirstTuesday & Char(10) &
"The First Tuesday of last month is: " & FirstTuesdayPrevMonth & Char(10) &
"The First Tuesday of next month is: " & FirstTuesdayNextMonth & Char(10) &
"The Second Tuesday of this month is: " & SecondTuesday & Char(10) &
"The Second Tuesday of last month is: " & SecondTuesdayPrevMonth & Char(10) &
"The Second Tuesday of next month is: " & SecondTuesdayNextMonth & Char(10) &
"The Third Tuesday of this month is: " & ThirdTuesday & Char(10) &
"The Third Tuesday of last month is: " & ThirdTuesdayPrevMonth & Char(10) &
"The Third Tuesday of next month is: " & ThirdTuesdayNextMonth & Char(10) &
"The Fourth Tuesday of this month is: " & FourthTuesday & Char(10) &
"The Fourth Tuesday of last month is: " & FourthTuesdayPrevMonth & Char(10) &
"The Fourth Tuesday of next month is: " & FourthTuesdayNextMonth & Char(10) &
"The First Wednesday of this month is: " & FirstWednesday & Char(10) &
"The First Wednesday of last month is: " & FirstWednesdayPrevMonth & Char(10) &
"The First Wednesday of next month is: " & FirstWednesdayNextMonth & Char(10) &
"The Second Wednesday of this month is: " & SecondWednesday & Char(10) &
"The Second Wednesday of last month is: " & SecondWednesdayPrevMonth & Char(10) &
"The Second Wednesday of next month is: " & SecondWednesdayNextMonth & Char(10) &
"The Third Wednesday of this month is: " & ThirdWednesday & Char(10) &
"The Third Wednesday of last month is: " & ThirdWednesdayPrevMonth & Char(10) &
"The Third Wednesday of next month is: " & ThirdWednesdayNextMonth & Char(10) &
"The Fourth Wednesday of this month is: " & FourthWednesday & Char(10) &
"The Fourth Wednesday of last month is: " & FourthWednesdayPrevMonth & Char(10) &
"The Fourth Wednesday of next month is: " & FourthWednesdayNextMonth & Char(10) &
"The First Thursday of this month is: " & FirstThursday & Char(10) &
"The First Thursday of last month is: " & FirstThursdayPrevMonth & Char(10) &
"The First Thursday of next month is: " & FirstThursdayNextMonth & Char(10) &
"The Second Thursday of this month is: " & SecondThursday & Char(10) &
"The Second Thursday of last month is: " & SecondThursdayPrevMonth & Char(10) &
"The Second Thursday of next month is: " & SecondThursdayNextMonth & Char(10) &
"The Third Thursday of this month is: " & ThirdThursday & Char(10) &
"The Third Thursday of last month is: " & ThirdThursdayPrevMonth & Char(10) &
"The Third Thursday of next month is: " & ThirdThursdayNextMonth & Char(10) &
"The Fourth Thursday of this month is: " & FourthThursday & Char(10) &
"The Fourth Thursday of last month is: " & FourthThursdayPrevMonth & Char(10) &
"The Fourth Thursday of next month is: " & FourthThursdayNextMonth & Char(10) &
"The First Friday of this month is: " & FirstFriday & Char(10) &
"The First Friday of last month is: " & FirstFridayPrevMonth & Char(10) &
"The First Friday of next month is: " & FirstFridayNextMonth & Char(10) &
"The Second Friday of this month is: " & SecondFriday & Char(10) &
"The Second Friday of last month is: " & SecondFridayPrevMonth & Char(10) &
"The Second Friday of next month is: " & SecondFridayNextMonth & Char(10) &
"The Third Friday of this month is: " & ThirdFriday & Char(10) &
"The Third Friday of last month is: " & ThirdFridayPrevMonth & Char(10) &
"The Third Friday of next month is: " & ThirdFridayNextMonth & Char(10) &
"The Fourth Friday of this month is: " & FourthFriday & Char(10) &
"The Fourth Friday of last month is: " & FourthFridayPrevMonth & Char(10) &
"The Fourth Friday of next month is: " & FourthFridayNextMonth & Char(10) &
"The First Saturday of this month is: " & FirstSaturday & Char(10) &
"The First Saturday of last month is: " & FirstSaturdayPrevMonth & Char(10) &
"The First Saturday of next month is: " & FirstSaturdayNextMonth & Char(10) &
"The Second Saturday of this month is: " & SecondSaturday & Char(10) &
"The Second Saturday of last month is: " & SecondSaturdayPrevMonth & Char(10) &
"The Second Saturday of next month is: " & SecondSaturdayNextMonth & Char(10) &
"The Third Saturday of this month is: " & ThirdSaturday & Char(10) &
"The Third Saturday of last month is: " & ThirdSaturdayPrevMonth & Char(10) &
"The Third Saturday of next month is: " & ThirdSaturdayNextMonth & Char(10) &
"The Fourth Saturday of this month is: " & FourthSaturday & Char(10) &
"The Fourth Saturday of last month is: " & FourthSaturdayPrevMonth & Char(10) &
"The Fourth Saturday of next month is: " & FourthSaturdayNextMonth & Char(10) &
"The First Sunday of this month is: " & FirstSunday & Char(10) &
"The First Sunday of last month is: " & FirstSundayPrevMonth & Char(10) &
"The First Sunday of next month is: " & FirstSundayNextMonth & Char(10) &
"The Second Sunday of this month is: " & SecondSunday & Char(10) &
"The Second Sunday of last month is: " & SecondSundayPrevMonth & Char(10) &
"The Second Sunday of next month is: " & SecondSundayNextMonth & Char(10) &
"The Third Sunday of this month is: " & ThirdSunday & Char(10) &
"The Third Sunday of last month is: " & ThirdSundayPrevMonth & Char(10) &
"The Third Sunday of next month is: " & ThirdSundayNextMonth & Char(10) &
"The Fourth Sunday of this month is: " & FourthSunday & Char(10) &
"The Fourth Sunday of last month is: " & FourthSundayPrevMonth & Char(10) &
"The Fourth Sunday of next month is: " & FourthSundayNextMonth & Char(10)
)
)
)
Example: Use the code above to get the Third Wednesday of Next Month
To be clear again: I DO NOT EXPECT YOU TO USE ALL OF THE ABOVE EVERY TIME
Reduce the code to only what you need for your case. In this example I will be looking for the Third Wednesday of Next Month:
Step 1:
Remove the Other weekdays (as they are not Wednesday)
Step 2:
Remove the ThisMonth and PrevMonth references (as we only need Next Month)
Step 3:
Remove the references to First, Second, Fourth (as we only need the Third)
This gives us:
With(
{
FirstOfNextMonth: DateAdd( Date( Year(dat_OriginalMeetingDate_HS.SelectedDate), Month(dat_OriginalMeetingDate_HS.SelectedDate), 1 ), 1, Months ),
WeekLength: 7
},
With(
{
DayOfWeekNextFirstOfMonthWednesday: Weekday(FirstOfNextMonth, StartOfWeek.Thursday),
Third: 3
},
With(
{
ThirdWednesdayNextMonth: DateAdd( FirstOfNextMonth, (Third * WeekLength) - (DayOfWeekNextFirstOfMonthWednesday))
},
"The Third Wednesday of next month is: " & ThirdWednesdayNextMonth & Char(10)
)
)
)

Conclusion
Using the above code and examples, you should be able to easily use and refer to the X Weekday of the Month in your Power Apps projects.
Make sure to check out my other blog posts and feel free to follow/peruse my other socials etc from the icons at the bottom of this page 🐈