Create Instant Flows for Approvals for YOU to Use in Microsoft Teams | Power Automate Guide
Using formatDateTime in Power Automate - New vs. Classic Designer
In this video tutorial, Jonathon Silva from Pragmatic Works walks viewers through how to use the formatDateTime expression in Power Automate, comparing the capabilities of the new Co-Pilot Designer versus the Classic Designer.
Overview of formatDateTime Expression
Power Automate users often need to reformat date values retrieved from sources like SharePoint. The formatDateTime() expression allows formatting those dates into various human-readable or system-preferred styles.
Jonathon begins by showing a SharePoint-based trigger where an item’s creation captures two date values:
- Date of Request – Retrieved from a SharePoint column
- Created On – Automatically generated by SharePoint
These dates are usually in the yyyy-MM-dd format, which is ideal for sorting but not always user-friendly. The goal is to convert them into formats such as Thursday November 9, 2023 or 09/11/2023.
Working with the New Co-Pilot Designer
In the Co-Pilot Designer, Jonathon demonstrates how to manually write expressions to format the date:
- Edit the flow and remove any existing dynamic content from the target field (e.g., Compose action).
- Open the Expression Editor and use the syntax:
formatDateTime(triggerOutputs()?['body/DateOfRequest'], 'dddd MMMM d yyyy')
This structure includes:
'dddd'– Full name of the day (e.g., Thursday)'MMMM'– Full name of the month'd'– Day of the month'yyyy'– Full year
Other common format tokens include:
dordd– Day (with or without leading zero)MMorMMM– Month number or abbreviated nameHH,mm,ss– Hour, minute, second
Jonathon also notes that users can pass an optional third parameter to set the language, such as 'en-US' or 'fr-FR', to localize the output.
Formatting with the Classic Designer
While the new designer requires manual expression entry, the Classic Designer offers a more visual approach using "Format Data by Example." Here’s how:
- Remove the current date dynamic content.
- Click on “Expression” and choose “Format data by example.”
- Enter a sample value that mimics the input format.
- Type the desired output format (e.g.,
12-Dec-2023orDecember 12, 2023). - Select a matching transformation from the suggested list.
- Click Get Expression and then Apply.
This method auto-generates the appropriate formatDateTime() expression, reducing the need to remember date/time formatting tokens.
Key Takeaways
- The
formatDateTime()expression is essential for customizing date output in Power Automate. - The Co-Pilot Designer offers full control through manual expressions.
- The Classic Designer simplifies the process using examples, making it beginner-friendly.
- Users can pass language parameters for localized formatting.
- Both methods ultimately provide the same result—it’s just a matter of preference and familiarity.
Conclusion
Jonathon encourages users to try both methods—manual formatting in the Co-Pilot Designer and sample-based formatting in the Classic Designer—to determine what fits best for their workflows. Whether you're comfortable with expressions or prefer a guided interface, Power Automate offers flexible ways to format date and time fields effectively.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Automate and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.
Sign-up now and get instant access
ABOUT THE AUTHOR
Jonathon Silva is a Trainer for Pragmatic Works, specializing in the Power Platform. He graduated from James Madison University in 2011, has a master’s degree in Education, and comes with 9 years of teaching experience in high school economics and history. Jonathon has consistently been recognized as a top educator in the field of history and leader in curriculum development. His primary focus is helping our customers learn the ins and outs of Power Apps and Power BI.
Free Community Plan
On-demand learning
Most Recent
private training

Leave a comment