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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,570)