cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MD2409_
Regular Visitor

Odata Filter documents of sharepoint library with formatDateTime doesn't work

Hi Community,

 

getting crazy with this stupid date time format expression filter.

 

In test environment we have a german sitecollection / library / date coulmn

There the filter which workfs fine with:

The coulmn show the date eg 30.6.2020
Next_x0020_Review_x0020_Due_x0020_By eq 'formatDateTime(addDays(utcnow(),-7),'yyyy-MM-dd')'

 

In Prod there is a english sitecollection and the same filter doesn't work

The coulmn show the date eg 2020/06/30

How is the correct expression for the english library / column ?

 

Best regards

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @MD2409_ ,

 

Please try to run Get items action without configuring Filter Query first and check the Body of the action.

 

Get the display name of the specified date column and check the format of the date.

 

Then you could configure Filter Query again and format the date parameter to filter items.

 

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.

View solution in original post

3 REPLIES 3
DeepakS
Super User
Super User

HI @MD2409_ 

 

Have you tried following expression in prod:

Next_x0020_Review_x0020_Due_x0020_By eq 'formatDateTime(addDays(utcnow(),-7),'yyyy/MM/dd')'

 

Regards,

ChristianAbata
Super User II
Super User II

hi @MD2409_  you can try @DeepakS  sols the format is  7/13/2017 or you can change the column format.

 

https://sharepointmaven.com/change-date-format-sharepoint/



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
v-bacao-msft
Community Support
Community Support

 

Hi @MD2409_ ,

 

Please try to run Get items action without configuring Filter Query first and check the Body of the action.

 

Get the display name of the specified date column and check the format of the date.

 

Then you could configure Filter Query again and format the date parameter to filter items.

 

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.

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (9,495)