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 / Change the date fields...
Power Automate
Suggested Answer

Change the date fields format returned for a word template via Parse Json

(0) ShareShare
ReportReport
Posted on by
Hello all, I am a newbie at this so please be gentle ;-) I have no experience at all in Power Automate and just started the learning process on Saturday.
 
I have a number of columns in a Sharepoint List that contain dates in dd/MM/yyyy format. I want to populate a Word document but the dates returned from the "Get Items" action are in YYYY/MM/dd format. How do I ensure they are entered into the word document in dd/MM/yyyy format. The Sharepoint List (Master Staff) contains a mixture of field types and approximately 20 date field types.
 
From my research I believe that after the "Get Items" action, I need to add a "Parse JSON" action that will go though the Sharepoint List, identify the date fields and format the dates to the desired dd/MM/yyyy format. Am I correct in this assumpation?
 
I have used Copilot to generate the code below, but Power Automate will not accept the code. What is wrong with it?
 
// Loop through each list item
Apply to each (Item in List):
    // Loop through each field in the item
    Apply to each (Field in Item):
        // Check if field is a date
        If (Field is Date):
            // Format the date
            Set Field = formatDateTime(Field, 'dd/MM/yyyy')
 
Below is a screenshot of the flow
 

 
Thank you for any help you can provide
 
Cliff
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    You would use the formatDateTime expression, which you can read about at Customize or format date and time values in a flow - Power Automate | Microsoft Learn. Both SharePoint and Power Automate handle dates in the ISO 8601 format, which is yyyy-MM-dd, but using this expression you can format it as needed.

    As for why it is not working in your flow, you'll need to show how you configured the action where it is not working rather than just showing the actions in your flow. Without seeing how you configured it, there is no way to know what you may have done wrong. If you're getting an error message, it is important to include that in the post as well as that will give a clue to the issue.

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

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard