Pragmatic Works Nerd News

Using formatDateTime in Power Automate - New vs. Classic Designer

Written by Jonathon Silva | Jun 12, 2026

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:

  1. Edit the flow and remove any existing dynamic content from the target field (e.g., Compose action).
  2. 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:

  • d or dd – Day (with or without leading zero)
  • MM or MMM – Month number or abbreviated name
  • HH, 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:

  1. Remove the current date dynamic content.
  2. Click on “Expression” and choose “Format data by example.”
  3. Enter a sample value that mimics the input format.
  4. Type the desired output format (e.g., 12-Dec-2023 or December 12, 2023).
  5. Select a matching transformation from the suggested list.
  6. 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.