Notifications
Announcements
Hello,
I have a SharePoint list with column Date and Time and i want a flow that should be run depends on "Date &Time" minus 7 days.
example : if "Date and Time" equals to 12/01/2020 9h AM, the result should be : 05/02/2020 9h AM.
Any ideas?
Hi @Anonymous
You can add a condition to the flow to check for items that meet the below condition and then execute the business logic.
DateField eq formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-dd')
The above condition can be used to get the items whose DateTime field value is equal to current date - 7 days.
hello @sudharsan1985 ,
Can you tell me what's the error please?
the condition is : Date_x0020_et_x0020_heure_x0020_ eq formatDateTime(addDays(utcNow(), -7), 'dd-MM-yyyy')
What is Date_x0020_et_x0020_heure_x0020_? A variable? If so, what is its value?
hello @VictorIvanidze
Date_x0020_et_x0020_heure_x0020_ : it's the column name type Date and time
And what does it contain?
Date and time, when the user choose the date and time and save it to SharePoint list, i want flow to get the date minus 7 days and continue the steps
Have a look at this: https://powerusers.microsoft.com/t5/Building-Flows/Filter-sharepoint-list-column/td-p/556117
HI @Anonymous
I provided the condition to be used inside an action like Get Items etc. If you want to use it in triggerActions, please have a look at the following links
Microsoft Power Automate Flow Trigger Conditions
Power Automate Trigger Conditions made EASY
Hello @sudharsan1985 ,
I tried the get items and a condition inside
In condition : equals(outputs('Obtenir_les_éléments')?['body/value'], formatDateTime(addDays(utcNow(), -7, 'yyyy-MM-dd')))
but it's not working, any ideas ?
SharePoint column is Date & Time
I think you misunderstood, the condition code that I mentioned is to use as a Filter Query inside the Get Items action. The condition you had mentioned should come in the triggerCondition and not the value for the Condition branch. I think you are confused, just try the condition code that I replied in the Filter Query. It should work.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 501 Super User 2025 Season 2
Tomac 323 Moderator
abm abm 237 Most Valuable Professional