Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Format currency/date column in html table

(0) ShareShare
ReportReport
Posted on by 74

I am running a database Stored Procedure

from that resulting dataset, I create a html table, with automatic columns selected

that html table then gets some CSS table styling

and the final table then gets sent in an email

 

Everything works fine except for the fact that the 3 currency columns in the table aren't formatted to display that, along with a date column which is an ugly format from the database. 

 

Should I add a Compose step somewhere? How can I use that to access a particular column inside my html table to format numbers/dates?

 

 

drewbty_0-1668586580516.png

drewbty_1-1668586647532.png

 

 

  • drewbty Profile Picture
    74 on at
    Re: Format currency/date column in html table

    Excellent solution, thanks!

  • Verified answer
    Ajinder31 Profile Picture
    530 on at
    Re: Format currency/date column in html table

    Hi @drewbty , Please try below expressions 

    1. For Currency field. eg. Price 

    formatNumber(item()?['Price'], 'C2')

     
    2. For DOB field

    formatDateTime(item()?['Client DOB'], 'dd/MM/yyyy')

     

    Ajinder31_0-1668592515732.png



    --------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.



  • drewbty Profile Picture
    74 on at
    Re: Format currency/date column in html table

    Edit

  • drewbty Profile Picture
    74 on at
    Re: Format currency/date column in html table

    Example of output from stored procedure.

    Stake and Payout should be to 2 decimal places and include a $ sign. Client DOB should change to dd/mm/yyyy.

    Not that this is just an example of one {} within the array. But there are many. All of them have the same column headers.  

     

    {
    "Table1": [
    {
    "Match": "xxxxx v xxxxx",
    "Market": "xxxxx",
    "Outcome": "xxxx",
    "Stake": 194.7,
    "Price": 1.95,
    "Payout": 254.7,
    "Client First Name": "xxxxx",
    "Client Surname": "xxxx",
    "Client Suburb": "xxxx",
    "Client State": "xxxx",
    "Client Phone": "000000000",
    "Client Mobile": null,
    "Client Email": "xxxxxx@gmail@gmail.com",
    "Client DOB": "1989-03-10T00:00:00"
    },

  • Ajinder31 Profile Picture
    530 on at
    Re: Format currency/date column in html table

    Hi @drewbty , Can you please share the values received and required formats for both date and currecny fields?

    --------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1