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 / Set variable to datetime
Power Automate
Unanswered

Set variable to datetime

(0) ShareShare
ReportReport
Posted on by 129

i would like to test my app and run it on specific time. i figure that setting the datetime would be a great idea but it seems like i am having some issues currently. How should i set the variable to a date time variable?

Appleonwindows_0-1710980953279.png

 

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Appleonwindows 
    Are you currently operating within a flow with Power FX enabled?

    Please try copying and pasting the provided code to verify if it functions correctly.

    Deenuji_0-1710994539025.png

    Code:

     

     

    DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
    SET Dayofweek TO CurrentDateTime.DayOfWeek

     

     

     

    Are you new to Power Automate Desktop and unsure how to copy and paste the code provided?

    Deenuji_1-1710994768019.gif

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀. If you'd like to appreciate me, please write a LinkedIn recommendation 🙏

     
     
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you want to manually set a specific value as a date, set it first, and then use Convert text to date time to convert it to a valid datetime value.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard