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 / Format ISO date to yyy...
Power Automate
Unanswered

Format ISO date to yyyy-MM-dd

(0) ShareShare
ReportReport
Posted on by
Hi all,
So I've got a flow that sends an email when a set of conditions are met.
I want to include the listed date in the body of the email but I'm having trouble with the code.
In my 'List rows present in a table' action I've got the parameter 'DateTime Format' set as ISO 8601 and then later in my flow at the email stage I've got it as 
items('For_each')?['Date']
It works but the date displays as this '2024-08-08T00:00:00.000Z' and I want it to look like '2024-08-08'
 
I've tried using formatDateTime('yyy-MM-dd')?['Date'] in the email action and list rows action in a few different formats and orders but it always comes up as an error
 
Anyone know how to fix this?
 
Thanks!!
Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,508 Moderator on at
    Whenever you are working with Dates using the List Rows Present in a Table action, you need to ensure that you set the DateTime Format to ISO 8601.
     
    You might be interested in this YT Tutorial: 
     
    Are you easily stumped when working with Dates in Power Automate? In this Power Automate tutorial, I’ll show you how to compose an expression that will return a future date, a past date, how to count the number of days between two dates, how to check for a birthdate and anniversary date as well as tips and tricks when working with dates in Power Automate. I’ll cover some common use cases and concepts that can help you to build better Power Automate flows.
    Feel free to skip ahead using the timestamps listed below. I’ve also linked a few other tutorials that you might be interested in as well.
     
    IN THIS VIDEO:
    ✓ 4 Date Functions You Need to Know
    ✓ How to use the Convert Time Zone Action
    ✓ How to Get a Future Date
    ✓ How to Get a Past Date
    ✓ How to Return SharePoint Items Due in a Number of Days
    ✓ How to Return SharePoint Items Due within a Date Range
    ✓ How to write a Filter Query for SharePoint Items Due in 30, 60 and 90 Days
    ✓ How to Calculate the Number of Days between Two Dates
    ✓ How to Check for a Birthdate and Anniversary Date
    ✓ How to work with Dates and Times in Excel
    ✓ How to use a Manual Trigger with Date Input
    ✓ How to Output Dynamic Text with an Expression
    ✓ How to Check if a Date Falls on a Weekend
     
     
    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • Chriddle Profile Picture
    8,689 Super User 2026 Season 1 on at
    Check how to use formatDateTime()
     
    E.g.
    formatDateTime(items('For_each')?['Date'], 'yyyy-MM-dd')
     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard