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 / Issue with Formatting ...
Power Automate
Answered

Issue with Formatting Date and Adding into Excel

(0) ShareShare
ReportReport
Posted on by 658
Hi,
 
I have a Power App which when a form is entered and the submit button is pressed, it starts a flow to pass the selected date in the form into Excel. For some reason, the date is not formatting as 'dd/mm/yyyy' as I would like. It appears in excel as 'mm/dd/yyyy'. I have tried using the parseDateTime expression to then format this in a compose action but it doesn't seem to work. I have found that when a date like 23/12/2024 is entered it will then give an error and say it's not in the ISO 8601 format, if a date like 09/12/2024 is entered it will usually work. Please see pictures below of my flow and the actions.
 
Any help would be greatly appreciated, thanks.
Categories:
I have the same question (0)
  • Verified answer
    Srini007 Profile Picture
    3,421 Super User 2025 Season 2 on at
    Hi @BS10,
     
    Apologies for the error, you can try below expression
     
    formatDateTime(concat(split(triggerBody()?['text_3'], '/')[2], '-', split(triggerBody()?['text_3'], '/')[1], '-', split(triggerBody()?['text_3'], '/')[0]), 'yyyy-MM-dd')
     
    This way you can achieve the required output
     
    If I have answered your question, please mark it as the Answered. If you like my response, please give it a Like.
     
    Regards,
    Srini
     
     
  • BS10 Profile Picture
    658 on at
     
    Thank you for your reply, I really appreciate it. I have added the expression below to the first compose action
     
    formatDateTime(triggerBody()?['text_3'],'yyyy-MM-dd')
     
    I then added another compose and set this expression to 
    formatDateTime(outputs('Compose'),'dd/MM/yyyy'
     
    This worked for a date when I entered 05/12/2024 which is correct but when I tried 20/11/2024 I got the same error as before, the value provided for date time string '20/11/2024' was not valid. The datetime string must match ISO 8601 format. 
     
    Thank you
  • Srini007 Profile Picture
    3,421 Super User 2025 Season 2 on at
    Hi @BS10,
     
    The issue here is powerautomate expects ISO 8601 format which is 2024-12-23, In this case you are passing 23-12-2024 which causes the issue.
     
    Try to place a compose and write the expression as formatDateTime('DateString', yyyy-MM-dd)
     
    After that you can continue the steps
     
    Let us know if you are facing any issue
     
    If I have answered your question, please mark it as the Answered. If you like my response, please give it a Like.
     
    Regards,
    Srini

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
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 185 Super User 2025 Season 2

Last 30 days Overall leaderboard