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 Automate
Answered

Change Date Format

(0) ShareShare
ReportReport
Posted on by 64

Hi There,

 

I have a flow that uses Encodian Parse CSV then Parse JSON and then Sharepoint Create Item to add this to a list.

 

The Parse JSON ouotputs a date field in the CSV as String in the format "DD/MM/YYYY" and the Create Item is failing as it is reading the string in the format "MM/DD/YYYY"

 

I can see two possible options.

1. Change the Create Item so that it accepts the date in "DD/MM/YYYY" format. Not sure if this is even possible.

2. Convert the input string to "MM/DD/YYYY" but I have no idea how this could be done as it is literally a text string so has no concept of it being a date.

 

Thanks for any advice.

Categories:
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @MilesTone  Option-1 : Go to SP setting and change your regional setting so that it can accept input in dd/mm/yyyy format.

    Option-2: Convert your string in date using add to time action and add 0 so that output is still same but your string will be converted to Date.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @MilesTone 

    Go to your Power Automate settings.  What has been selected for the Regional Format?

    You could use a split() expression and spilt on the /.  That will give you an array of 3 elements.  You can use the concat() expression to build the date in the format that you want.

     

  • MilesTone Profile Picture
    64 on at

    Thanks for the suggestion but these dont work, unfortunately. The SP list is already set to accept dates in the format. the problem is that the Create Item cant read the input data as it doesnt recognise the format. Add to time doesnt work either as it needs its input in ISO8601 format not the string that I have.

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @MilesTone  You can also use add hours/days whatever.

    Hardesh15_0-1660823743573.png

    See i am passing string and it is working fine.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • MilesTone Profile Picture
    64 on at

    Thanks for your reply. Region is set to UK. Suspect I will have to split and then concatenate. 

  • Verified answer
    MilesTone Profile Picture
    64 on at

    I had to go down this route. In order to use the formatDateTime function the input needs to be in a recognised date format. so I declared two variables; one Array called <splitDate> and one String called <dayMonth>. I used the split function to break the input in to an array split by the "/". 

    split(items('Apply_to_each_2')['Start Date'],'/')

     dayMonth then takes that array and recompiles it into the correct format using the below.

    formatDateTime(concat(variables('splitDate')[2], '-', variables('splitDate')[1], '-', variables('splitDate')[0]), 'dd MMMM yyyy')
    Capture.PNG
    This is working perfectly as the output of this variable is in a date format

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
Mohsin Ali Profile Picture

Mohsin Ali 445

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 300

Last 30 days Overall leaderboard