cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Creating new elements on SharePoint from excel depending on date

Hi everyone,

 

I have an Excel file which is updated every 4 hours. As this updating changes the file constantly I want to build a flow to copy certain elements (at an specific hour) in a SharePoint list. The condition that determines which elements have to be copied is the Day colum. I want to copy all events that happened yesterday but I don't know how to do this. My doubst are:

  • What is the formula that gives the day of yesterday? I've tried with formatDateTime but I only achieved the day of today
  • How should I put the flow condition to achieve the info transfering?
  • It is necessary to adjust the format of the colum in excel and/or sharepoint?

Thank you very much!

 

Regards,

Masoud9

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Creating new elements on SharePoint from excel depending on date

Hi @Masoud9 

 

Let's tackle this into parts. First, the formula to get yesterday is the following:

addDays(startOfDay(utcNow()),-1)

You get the start of today's day and remove one day.

 

You can use the formula with a Condition where the right side you put your Day column from Excel and in the left the formula. Something like this:

Screenshot 2020-01-29 at 10.23.22.png

 

When inserting in SharePoint you need to insert a valid date so that Excel can store it. If your Day field is already a date you can use it and the date will be saved.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

2 REPLIES 2
Highlighted
Super User II
Super User II

Re: Creating new elements on SharePoint from excel depending on date

Hi @Masoud9 

 

Let's tackle this into parts. First, the formula to get yesterday is the following:

addDays(startOfDay(utcNow()),-1)

You get the start of today's day and remove one day.

 

You can use the formula with a Condition where the right side you put your Day column from Excel and in the left the formula. Something like this:

Screenshot 2020-01-29 at 10.23.22.png

 

When inserting in SharePoint you need to insert a valid date so that Excel can store it. If your Day field is already a date you can use it and the date will be saved.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

Highlighted
Frequent Visitor

Re: Creating new elements on SharePoint from excel depending on date

@manuelstgomes It worked perfectly, thank you very much!

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (6,233)