web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Setting a date variable
Power Automate
Unanswered

Setting a date variable

(0) ShareShare
ReportReport
Posted on by

Hi,

I am working on a flow that creates and updates planner task details with a list of information. One piece of information is a date. I initialized the variable as a string and set the variable. See attached. When I update the task details, I use the FormatDateTime expression and use the variable. formatDateTime(variables('xlsxHireDate'),'yyyy-MM-dd') When I test the flow, it fails.

 

Additional details: I use scope control to combine my steps for error handling. It appears I cannot initiate a variable within a scope.  

 

Thanks for the help!
Initialize variableInitialize variableSet variableSet variableExpressionExpressionErrorError

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    When reading the Excel file, please set the DateTime Format to ISO 8601

    2021-12-02_23-29-20.png

    Excel stores the date as integers, in a string. Selecting ISO 8601 should convert the data to a date type.

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • Community Power Platform Member Profile Picture
    on at

    Thank you! That worked!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard