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 Platform Community / Forums / Power Automate / How to change the date...
Power Automate
Answered

How to change the date format of the html table data

(0) ShareShare
ReportReport
Posted on by 2

I made the html setting as below and code which i copied from the peek-code, whcich also I have pasted, the data is coming from sharepoint date field, which is Date long.

I want to date to appear as "dd-mm-yyyy" in the output.

 

Please advise what correction and on which screen, Confused to be done on the Create Html Table screen  or on the html code screen.

 

 

MIA27_0-1659006607888.png

 

====================

{
    "inputs": {
        "from""@outputs('Get_items')?['body/value']",
        "format""HTML",
        "columns": [
            {
                "header""RecordNo",
                "value""@item()?['ID']"
            },
            {
                "header""ServiceDate",
                "value""@item()?['SvcDate']"
            },
            {
                "header""Model",
                "value""@item()?['Model']"
            },
            {
                "header""SerialNo",
                "value""@item()?['SerialNo']"
            },
            {
                "header""Mach-SMR",
                "value""@item()?['SvcSMR']"
            },
            {
                "header""AssetNo",
                "value""@item()?['AssetNo']"
            },
            {
                "header""JobDone",
                "value""@item()?['JobCategory']"
            }
        ]
    },
    "metadata": {
        "operationMetadataId""3e291b08-5ca9-434a-8082-447671132ede"
    }
}
 
==============================================  
 
My output is as below :
MIA27_1-1659006827866.png

 

Categories:
I have the same question (0)
  • David- Profile Picture
    1,254 on at

    You would use the expression formatDateTime([your field], 'dd-mm-yyyy')

  • MIA27 Profile Picture
    2 on at

    Dear Mr. David,

    Where to apply?. you mean in the html code view. could you please show more details by picking my line of my code, 

  • David- Profile Picture
    1,254 on at

    You would use the expression in the value column of the create HTML table action instead of the actual field.

  • MIA27 Profile Picture
    2 on at

    Applied and found red font (I think its error)

    MIA27_0-1659012118465.png

     

  • David- Profile Picture
    1,254 on at

    You can choose your field by switching to Dynamic content in the expression builder. It will then input something like item()?['SvcDate'] into your expression once you select the field. You can see these values in the fields you listed in your original post.

  • MIA27 Profile Picture
    2 on at

    Sorry unable to understand. you mean I should put the expression as below :

     

    MIA27_0-1659023140074.png

     

    Still it is showing red.

     

    Please note, the image i posted is the actual flow. But I am testing on another Inquiry records, Just to check  the date.

    issue is how to make the date is short to dd-mm-yyyy

     

    please advise what changes more to be done.
  • Verified answer
    David- Profile Picture
    1,254 on at

    Yes, that is where you would want to put the expression. However, you have not formatted it correctly, which is the cause of the error. You need to format it like:

     

    formatDateTime(item()?['InqDate'], 'dd-MM-yyyy')

     

    Note the placement of the quotes around the date format compared to what you entered.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 124 Super User 2026 Season 1

#2
Ellis Karim Profile Picture

Ellis Karim 52 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 50

Last 30 days Overall leaderboard