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 / Power Automate Desktop...
Power Automate
Unanswered

Power Automate Desktop with a wait until a certain time

(0) ShareShare
ReportReport
Posted on by 6

I want to run a flow then stop and wait until a certain time of day 10:35pm (20:35) see image attached how can I do this the loop comparing time doesn't seem to work for me

 

robmerritt_0-1716871133548.png

 

 

  • VishnuReddy1997 Profile Picture
    2,666 Super User 2026 Season 1 on at

    Hi @robmerritt ,

     

    Firstly you have enabled the Power Fx while creating a flow. Power FX in PAD is still in preview state,so we dont recommend it to use in production or development.Please disable the Power Fx as shown in below image.

    VishnuReddy1997_1-1716874296878.png

     

     

    Once disabled create a new flow with Power Fx diabled and Try to paste the code provided below.Please find the solution.

     

    VishnuReddy1997_0-1716874268052.png

     

     

    Code:

    Please copy this code to your flow.

    DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentTime
    Text.ConvertDateTimeToText.FromDateTime DateTime: CurrentTime StandardFormat: Text.WellKnownDateTimeFormat.LongTime Result=> CurrentTime
    Text.ConvertTextToDateTime.ToDateTimeCustomFormat Text: CurrentTime CustomFormat: $'''HH:mm:ss''' DateTime=> CurrentTime
    SET EndTime TO $'''10:58:00'''
    Text.ConvertTextToDateTime.ToDateTimeCustomFormat Text: EndTime CustomFormat: $'''HH:mm:ss''' DateTime=> EndTime
    LOOP WHILE (CurrentTime) <= (EndTime)
     Display.ShowMessageDialog.ShowMessageWithTimeout Message: $'''Test''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False Timeout: 1 ButtonPressed=> ButtonPressed13
     DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentTime
     Text.ConvertDateTimeToText.FromDateTime DateTime: CurrentTime StandardFormat: Text.WellKnownDateTimeFormat.LongTime Result=> CurrentTime
    END

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

     

  • Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 2 on at

    Hi @robmerritt ,

    You can try with this approach.

    Ahammad_Riyaz_0-1716875336588.png

    LOOP WHILE (1) = (1)
     DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
     Text.ConvertDateTimeToText.FromCustomDateTime DateTime: CurrentDateTime CustomFormat: $'''hh:mm''' Result=> CurrentDateTime
     IF CurrentDateTime > $'''20:35''' THEN
     EXIT Code: 0
     END
    END
    

     

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    Regards,
    Riyaz

     

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Ahammad_Riyaz  Nice approach.

  • robmerritt Profile Picture
    6 on at

    hey that is great after I have pasted that in how do I view edit the code ...IE change the time?

  • Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 2 on at

    Just paste the code in PAD there you can edit code or view even that 20:30 you can set variable, before that just disable the Power FX disable.

    Ahammad_Riyaz_0-1716957850875.png

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 259 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 134 Super User 2026 Season 2

Last 30 days Overall leaderboard