cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kouliscon
Helper V
Helper V

flow to find the date of the day Monday from the last week of the month and put it at a filed in SHarePoint Online list column

Hello,

 

i am looking for a flow to run every 1st of the month and to calculate the below:

 

  • the date of the day of Monday from the last week of the current month
  • the date of the day of Tuesday from the last week of the current month
  • ...........

 

Flow will run once every 1st of the Month and will replace the values.

 

let me know your thoughts and thank you

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @kouliscon

Based on the issue that you mentioned, do you want to update the SharePoint list with the Monday from the last week of the month?

I have seen that @Mira_Ghaly has provided you with a great solution of the Monday from the last week of the month.

Here is a little bit difference between us, I will post mine for your reference. In addition, if you only want to trigger the flow on the first day of the month, and update the last Monday date to the SharePoint list, please check as below:

vqiaqimsft_0-1627012074808.png

vqiaqimsft_1-1627012217414.png

Expression1:

 

dayofweek(startOfMonth(utcNow()))

 

Expression2:

 

subtractFromTime(startOfMonth(addToTime(utcNow(), 1, 'month')), 1, 'day')

 

Expression3:

 

dayOfWeek(outputs('last_day_of_the_month_2'))

 

Expression4:

 

addDays(outputs('last_day_of_the_month_2'), sub(1, outputs('Weekday_of_the_first_day_of_the_month_2')), 'MM-dd-yyyy')

 

Add a Create item action as below and populate the date column with the correct output:

vqiaqimsft_2-1627012434513.png

 

 

Best Regards,
Qi

View solution in original post

2 REPLIES 2
v-qiaqi-msft
Community Support
Community Support

Hi @kouliscon

Based on the issue that you mentioned, do you want to update the SharePoint list with the Monday from the last week of the month?

I have seen that @Mira_Ghaly has provided you with a great solution of the Monday from the last week of the month.

Here is a little bit difference between us, I will post mine for your reference. In addition, if you only want to trigger the flow on the first day of the month, and update the last Monday date to the SharePoint list, please check as below:

vqiaqimsft_0-1627012074808.png

vqiaqimsft_1-1627012217414.png

Expression1:

 

dayofweek(startOfMonth(utcNow()))

 

Expression2:

 

subtractFromTime(startOfMonth(addToTime(utcNow(), 1, 'month')), 1, 'day')

 

Expression3:

 

dayOfWeek(outputs('last_day_of_the_month_2'))

 

Expression4:

 

addDays(outputs('last_day_of_the_month_2'), sub(1, outputs('Weekday_of_the_first_day_of_the_month_2')), 'MM-dd-yyyy')

 

Add a Create item action as below and populate the date column with the correct output:

vqiaqimsft_2-1627012434513.png

 

 

Best Regards,
Qi

View solution in original post

kouliscon
Helper V
Helper V

@v-qiaqi-msft thank you for the great info

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (3,232)