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
kouliscon
Helper V
Helper V

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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,861)