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 Automate
Unanswered

Flow and UTC

(0) ShareShare
ReportReport
Posted on by 1,265

I have a Flow that I believe I want to run daily with a Start Time (example:  2024-05-07T05:00:00:000Z).  I then want to Select items from the previous day through the day the Flow runs (-4 hours).  So...

 

StartDate = addDay(utcNow(),-1) "based on my exampleabove, this would be 2024-05-06T05:00:00:000Z" 

EndDate = 2024-05-07T01:00:00:000Z

 

How do I write the EndDate in the addDay(utcNow()) format?

Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,840 Super User 2026 Season 1 on at

    I am guessing you're asking for a query filter. I include the StartOfDay expression with the utcNow() expression. Then for the filter query, I use where start date expression is ge (greater than or equal to) and the end date expression is lt (less than). StartOfDay will return the date starting at midnight. If you are pulling from a SharePoint list, all dates are stored in UTC.

  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @RJF61 ,

    Since I am in the UTC+8 zone, I need to add 8 hours to the utcNow() time to get the current date.

    Today's date add '05:00:00.000Z' is used as the end date.

    Then subtract 20 hours to get the time minus 4 hours from the previous day as the start date.

    vyetonggumsft_0-1715050326830.png

     

    addHours(addHours(utcNow(),8,'yyyy-MM-ddT05:00:00.000Z'),-20,'yyyy-MM-ddTHH:mm:ss.000Z')
    addHours(utcNow(), 8, 'yyyy-MM-ddT05:00:00.000Z')

     

    Best Regards,

    Sunshine Gu

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 462

#2
Vish WR Profile Picture

Vish WR 256

#3
David_MA Profile Picture

David_MA 242 Super User 2026 Season 1

Last 30 days Overall leaderboard