Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Help me with my compose date formula pretty please!

So I have a flow for an app that when they push a button, it should take the date they entered in and pull rows from the excel table its referencing based on that date minus 5 days.  In other words I have the user entering in the last day of the week.  I want the flow to pull in all the rows with that date minus a handful of days.  So then all of the data from just that week is pulled.  Here's what I have so far, but I can't get it figured out. 

@equals(formatDateTime(utcNow(), 'MM/dd/yyyy'), formatDateTime(addDays(items('List rows present in a table')?['Date'],-5),'MM/dd/yyyy'))
Dual Super User
Dual Super User

Re: Help me with my compose date formula pretty please!

HI @Salamander94 


Can you please share a screenshot of the flow? Also, can you please share what data is coming in the date column from the excel sheet? Note that you need to modify the date column in your excel sheet to type text and then send that as a string to flow. Else, it will send a junk value that will not be detected as a date time string and the flow will fail. 


Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Level: Powered On

Re: Help me with my compose date formula pretty please!

flow.PNGSo the first "list rows..." gets the last day of the week entered by the user.  Then the compose is for trying to make a filter to get that date and the 4 days before it.  I apply the compose output to the odata filter of the second "list rows present in..." then I would like to get the data to sit somewhere like a word template or email if nothing else. 


Question, when you were talking about how my data column needs to be setup on my excel table, did you mean the column needs to be set to "general"?  Right now I have it set to date/time.


Also, would it help if I asked the user to input the start of the week as well?  Then I could use a filter to filter out the start and end date plus the days in between.

Community Support Team
Community Support Team

Re: Help me with my compose date formula pretty please!

Hi @Salamander94 ,


Although I have not fully figured out your intentions, please refer to the following method to compare current Date and Date field in the table.

The field value of Date type in Excel table will exist as a number in MS Flow, which needs to be restored to a Date string.

Image reference:



Expression reference:


Hope it helps.


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources


Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!


Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (4,790)