cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gaëlle
Level 8

OData Filter SP items on Date = Today +1

Hell othere 🙂

I need a little help on a flow :

I try to get SP Items from a list, but i would like to filter them (with a OData query) as follow :

DepartureDate eq Today+1Day

 

I wrote the following :getelements_filter.PNG

 

 

But my flow is getting an empty value because my Date is not written well, and the UTCnow seems not  to work (it should give 02/07/2018, and certainly not 03/23/2018):getelements_filter02.PNG

 

 

Should i use the "FormatDateTIme"  expression ?

 

Coud you help me on this please ?

 

Thanks a lot 🙂

 

Thanks a lot !

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Gaëlle
Level 8

Re: OData Filter SP items on Date = Today +1

Annnd Done !

 

Finally I could get it right !

DepartureDate eq 'addDays(utcNow(),1,'yyyy-MM-dd')'

The addDays expression has to be written in the Expressions panel or it won't really be valid.

 

It is working now, YAY !

View solution in original post

2 REPLIES 2
Gaëlle
Level 8

Re: OData Filter SP items on Date = Today +1

A little up on this,

I found how to format my utcNow date correctly :

addDays(utcNow(),1,'dd/MM/yyyy') 

gives me 03/07/2018, which is okay.

 

But with DepartureDate eq addDays(utcNow(),1,'dd/MM/yyyy'), there is no items shown, even if i've set all my Items' DepartureDates to 03/07/2018.

 

I tried with

items()?['DepartureDate'] eq 'addDays(utcNow(),1,'dd/MM/yyyy')'

but flow says that my expression is not valid.

 

Please help me on this 😉

Highlighted
Gaëlle
Level 8

Re: OData Filter SP items on Date = Today +1

Annnd Done !

 

Finally I could get it right !

DepartureDate eq 'addDays(utcNow(),1,'yyyy-MM-dd')'

The addDays expression has to be written in the Expressions panel or it won't really be valid.

 

It is working now, YAY !

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

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

thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,731)