cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerAutomate3
Helper I
Helper I

What is the ODATA filter to return files created after a specific date?

Hello!

 

What is the ODATA filter to return files created after a specific date?

 

I am struggling to find the right syntax. Is there a reference? Pity that Microsoft does not offer an autocomplete!

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Gopala_Krishna
Super User
Super User

@PowerAutomate3 

To return the files that are created after a specific date you can use the filter 

 

Created ge 'DateValue'

 

Usually all the dates in SharePoint  are stored in UTC time, so when you are trying to do a comparison you must ensure that the date value that you are specifying is according to the UTC time and the date time value must be in format yyyy-MM-ddThh:mm:ssZ

 

to format datetime values in Power Automate you can make use of the format date time expression

formatDateTime('datetime value to be formatted','format')

 

Ex: Consider I want to retrieve all the files from SharePoint document library that are created after 10th October 2021

 

Filter query for the above statement would look as follows

Created ge '2021-10-10T00:00:00Z' (you can insert date value either manually or dynamically using Power Automate expressions)

 

Gopala_Krishna_0-1634441474659.png

formatDateTime(utcNow(),'yyyy-MM-ddThh:mm:ss') - Expression used.
 
For more information on ODATA filter query - Link
For information related to the formatDateTime expression - Link
 

------------------------------------------------------------------------------------------------------------------------------

If the information shared helps, please consider giving a thumbs up  👍 and mark solution as resolved

 

View solution in original post

1 REPLY 1
Gopala_Krishna
Super User
Super User

@PowerAutomate3 

To return the files that are created after a specific date you can use the filter 

 

Created ge 'DateValue'

 

Usually all the dates in SharePoint  are stored in UTC time, so when you are trying to do a comparison you must ensure that the date value that you are specifying is according to the UTC time and the date time value must be in format yyyy-MM-ddThh:mm:ssZ

 

to format datetime values in Power Automate you can make use of the format date time expression

formatDateTime('datetime value to be formatted','format')

 

Ex: Consider I want to retrieve all the files from SharePoint document library that are created after 10th October 2021

 

Filter query for the above statement would look as follows

Created ge '2021-10-10T00:00:00Z' (you can insert date value either manually or dynamically using Power Automate expressions)

 

Gopala_Krishna_0-1634441474659.png

formatDateTime(utcNow(),'yyyy-MM-ddThh:mm:ss') - Expression used.
 
For more information on ODATA filter query - Link
For information related to the formatDateTime expression - Link
 

------------------------------------------------------------------------------------------------------------------------------

If the information shared helps, please consider giving a thumbs up  👍 and mark solution as resolved

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,198)