web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter query - Filter ...
Power Automate
Answered

Filter query - Filter items not created TODAY (Local Time)

(0) ShareShare
ReportReport
Posted on by 27
Hello guys
 
I have a flow set up which deletes all files in a sub folder.
 
I would like to enhance the logic in this flow.
My process creates a new batch of files every week on Friday at 2:15pm (Melbourne, AUS timezone).
 
I would like to delete the files that were created the prior Friday at 2:15pm (Melbourne, AUS timezone).
I want to ensure that the files created this week Friday 2:15 are not deleted.
 
I am using SharePoint Get Files (properties only). Please can you advise what I need to set the filter query with?
 
The ideal logic I would like to learn is how to filter on items not created today, today being Melboure, AUS timezone.
 
 
Thank you
Categories:
  • Suggested answer
    David_MA Profile Picture
    15,625 Super User 2026 Season 2 on at
    The following filter query should work: convertTimeZone(startOfDay(utcNow()), 'UTC', 'AUS Eastern Standard Time')
  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at
    To generally determine today's start of day in Melbourne (in UTC time), use this expression:
    convertToUtc(
    	convertFromUtc(utcNow(), 'AUS Eastern Standard Time', 'yyyy-MM-dd'),
    	'AUS Eastern Standard Time'
    )
     
    This expression gets the current date in Melbourne (00:00):
    convertFromUtc(utcNow(), 'AUS Eastern Standard Time', 'yyyy-MM-dd') 
     
    Then convert it back to UTC.
     
     
    To set the time (Melbourne) to 2:15 pm, simply add the time to the datetime format string:
    convertToUtc(
    	convertFromUtc(utcNow(), 'AUS Eastern Standard Time', 'yyyy-MM-ddT14:15:00'),
    	'AUS Eastern Standard Time'
    )
     
    If your schedule for deleting files runs every Friday (after 2:15 p.m.), that's enough.
    Otherwise, you have to calculate the last Friday. I'll skip that for now ;)
     
    Your OData filter should look like this:
     
    Created lt '@{convertToUtc(
    	convertFromUtc(utcNow(), 'AUS Eastern Standard Time', 'yyyy-MM-ddT14:15:00'),
    	'AUS Eastern Standard Time'
    )}'
     

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard