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

 

 

I have the same question (0)
  • VishnuReddy1997 Profile Picture
    2,656 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,150 Super User 2026 Season 1 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

     

  • Deenuji_Loganathan_ 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,150 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 785

#2
Valantis Profile Picture

Valantis 669

#3
Haque Profile Picture

Haque 563

Last 30 days Overall leaderboard