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 / Convert string to date...
Power Automate
Unanswered

Convert string to date format

(0) ShareShare
ReportReport
Posted on by 6

Hi!

I am reading from a CSV file some dates. These dates are in the format dd-MM-YYYY. If i want to convert the string to a date i always fail. 

For this i use 

juergen contains 

18/05/2020

formatDateTime(variables('Juergen'), 'dd-MM-yyyy')
The system fails, because it expects it in the format MM-dd-yyyy. Can i change the expected format for the conversion? The only way i can think of is to manually change the string....Do you have any idea how to do it without changing the string?
Kind regards,
Juergen
Categories:
I have the same question (0)
  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    Hi @guju ,

     

    Please try the following expression:

    formatDateTime(concat(split(variables('Test'),'/')[1],'/',split(variables('Test'),'/')[0],'/',split(variables('Test'),'/')[2]),'dd-MM-yyyy')

    114.PNG

     

    Best Regards,

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard