Skip to main content
Community site session details

Community site session details

Session Id : E0WGGFlolTMZ86/WpMsGYm
Power Automate - Building Flows
Unanswered

Flow and UTC

Like (0) ShareShare
ReportReport
Posted on 6 May 2024 16:33:44 by 1,135

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?

  • v-yetonggu-msft Profile Picture
    on 07 May 2024 at 03:00:24
    Re: Flow and UTC

    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

  • David_MA Profile Picture
    11,767 Super User 2025 Season 1 on 06 May 2024 at 20:00:32
    Re: Flow and UTC

    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.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Loading complete