<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=612681139262614&amp;ev=PageView&amp;noscript=1">
Skip to content

Need help? Talk to an expert: phone(904) 638-5743

Mastering formatDateTime in Power Automate

Mastering formatDateTime in Power Automate

In a recent video tutorial, Jonathan Silva from Pragmatic Works dives into the intricacies of working with the formatDateTime expression in Power Automate. He explores various methods to manipulate and present date and time values in different formats. This blog post summarizes his key insights and demonstrates two approaches – one using the new Co-Pilot designer and another utilizing the classic designer with format data by examples.

 

Co-Pilot Designer Method:

1. Co-Pilot Introduction:

  • Jonathan introduces the new Co-Pilot designer, emphasizing its role in facilitating the storage of dates in different formats.

2. Quick Test on SharePoint Dates:

  • Demonstrates a quick test on SharePoint, highlighting two date fields: "date of request" and "created on date."

3. Format Date Time Expression:

  • Guides users on using the formatDateTime expression in Co-Pilot.
  • Explains the syntax: formatDateTime(<date_field>, <format>).
  • Illustrates how to set the desired format by rearranging letters (D for day, M for month, Y for year).

4. Example Formatting:

  • Walks through an example of formatting the date to display as "Thursday November 9, 2023."

5. Language Conversion (Optional):

  • Mentions the optional language conversion parameter for automatic translation.

6. Testing and Output:

  • Executes the flow and showcases the new formatted dates.

Classic Designer with Format Data by Example:

1. Classic Designer Introduction:

  • Jonathan introduces the classic designer and its format data by example feature as an alternative approach.

2. Formatting Date of Request:

  • Demonstrates how to use format data by example in the classic designer.
  • Allows users to click, select the field, provide a sample format, and set the desired format easily.

3. Quick Transformation Suggestions:

  • Highlights suggested transformations for users to choose from.

4. Building the Expression:

  • Shows how the classic designer automatically builds the expression based on the chosen format.

5. Language Settings:

  • Notes the addition of the optional language parameter in the classic designer and its default setting.

6. Formatting Created Date:

  • Applies the same approach to format the "created on date" using the classic designer.

7. Testing and Comparison:

  • Runs the flow again and compares the output with the Co-Pilot method.
  • Emphasizes the simplicity of building expressions without needing to know the code.

Jonathan concludes by encouraging users to explore both methods and choose the one that suits them best. Whether it's the intuitive Co-Pilot designer or the user-friendly classic designer with format data by example, mastering date and time formatting in Power Automate opens up new possibilities for efficient data presentation.

This summary provides a glimpse into Jonathan Silva's comprehensive tutorial, empowering Power Automate users with the skills to elegantly handle date and time expressions in their workflows.

Want more great content like this? Register for a free community plan account on 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 get the latest Microsoft tips and tricks.

Sign-up now and get instant access

Leave a comment

Free Trial

On-demand learning

Most Recent

private training

Hackathons, enterprise training, virtual monitoring