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 / Convert Date Time to T...
Power Automate
Answered

Convert Date Time to Text Format

(0) ShareShare
ReportReport
Posted on by 46

G11_M_0-1649260566902.png

Can anyone say , how to get the current Date from this Dropdown Box. From should be the yesterday date and To should be the current date. I have given the code below .

G11_M_1-1649260708647.png

when I run it , it shows an error message like this ,

 

Form field with selector 'div[Id="pageContent"] > div[Class="row pt-3 ng-scope"] > div > div[Class="col-md-3 col-sm-3 col-xs-12 pull-right input-prepend mb-0 ng-isolate-scope"] > input[Class="form-control has-feedback-left ng-pristine ng-valid ng-isolate-scope ng-not-empty ng-valid-min ng-valid-max ng-touched"][Name="name"]' not found.

 

  • Gematria Profile Picture
    222 on at

    Hey 🙂

     

    I see you first have a Click UI element in Window, which is part of the UI Automation part of PAD. So im thinking, is your browser control set properly to be Browser Automation and not UI automation?

     

    If the above isn't the issue, are you sure it populates like a Text field?

    Can you go to the website and type a date directly into the box, or do you have to choose from the dropdown menu?

     

    If you are able to populate it like a text field, then you could try to focus the element and use send keys instead - its not as elegant, but it works.

     

    If you cannot populate it like a text field, you can try to populate it as a dropdown box, otherwise you may be able to find some Javascript on the site you can run to populate the field.

  • Verified answer
    ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Which step in your screenshot is it erroring on? If it's not the click step, then you may consider using "Send Keys" to the foreground window. Possibly a Ctrl+A and Delete to empty it out and then the variable of what you are wanting to input.

     

    I have had to do that as an alternative to "Populate text field" in some of my bots. 

  • Gayu Profile Picture
    46 on at
     

    I follow as you told , The value is deleted from the textbox by using the Send Keys Action . But It cant write the value in it.

    G11_M_0-1649345541309.png

    This is how I use the variable in the Text field.

    G11_M_1-1649345979579.png

     

    G11_M_3-1649346186364.png

     

     

    I have given the error below.

     

    Form field with selector 'div[Id="pageContent"] > div[Class="row pt-3 ng-scope"] > div > div[Class="col-md-3 col-sm-3 col-xs-12 pull-right input-prepend mb-0 ng-isolate-scope"] > input[Class="form-control has-feedback-left ng-pristine ng-valid ng-isolate-scope ng-not-empty ng-valid-min ng-valid-max ng-touched"][Name="name"]' not found.

     

  • Verified answer
    ryule Profile Picture
    929 Super User 2024 Season 1 on at

    It looks like you are still using "Populate text field". Your cursor should already be in the text field with it all deleted, so you should only need to do another "Send keys" step with your %FormattedDateTime% to %FormattedDateTime2%

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
11manish Profile Picture

11manish 275 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 178 Super User 2026 Season 2

Last 30 days Overall leaderboard