Skip to content

Power Automate

Power Automate FormatDateTime Function Examples

Power Automate FormatDateTime Function Examples Posted by - Matthew Devaney on - September 15, 2024 9 Comments The Power Automate formatDateTime function is ...

Matthew Devaney
Published
Reading time
2 min read

Before you start

Is this guide for you?

Best entry point
Power Automate
Time investment
2 min read

Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/power-automate-formatdatetime-function-examples/. Author: Matthew Devaney.

Power Automate FormatDateTime Function Examples Posted by - Matthew Devaney on - September 15, 2024 9 Comments

The Power Automate formatDateTime function is used to convert a date & time value into a formatted text string. I will explain how to use the formateDateTime function and share several popular date & time format codes to help you quickly get the result you need. Table of Contents Syntax Quick Examples Popular Format Codes Date Format Codes Time Format Codes Syntax

formatDateTime(Timestamp, Format, Locale )

Timestamp – Required. The datetime value to format

Format – Optional. The format code which describes the desired output

Locale – Optional. The langauge and region in the format ‘en-us’ Quick Examples

Here are some examples of how to use the Power Automate formatDateTime function. Expression Output formatDateTime(utcNow(), ‘MM/dd/yyyy’) 06/03/2024

formatDateTime(utcNow(), ‘MMMM d, yyyy’) June 3, 2024

formatDateTime(utcNow(), ‘dddd, MMMM d, yyyy hh:mm:ss tt’) Monday, June 3, 2024 2:15:45 PM

formatDateTime(utcNow(), ‘dddd, MMMM d, yyyy hh:mm:ss tt’, ‘fr-fr’) Lundi, Juin 3, 2024 2:15:45 PM Popular Format Codes

The format argument to the Power Automate formatDateTime function is used to specify the date & time format. Copy and paste these popular format codes into your formatDateTime function to get the desired result. Format Code Output MM/dd/yyyy 06/03/2024 M/d/yyyy 6/3/2024 yyyy-MM-dd 2024-06-03 dd/MM/yyyy 03/06/2024 MMMM d, yyyy June 3, 2024 ddd, MMM d, yyyy Mon, Jun 3, 2024 dddd, MMMM d, yyyy Monday, June 3, 2024 dddd, MMMM d, yyyy hh:mm:ss tt Monday, June 3, 2024 2:15:45 PM MM-yyyy 06-2024 MMMM yyyy June 2024 hh:mm tt 2:15 PM HH:mm 14:15 Date Format Codes

Custom date formats for the Power Automate formatDateTime function can be built by using these format codes. Format Code Output d 3 dd 03 ddd Mon dddd Monday M 6 MM 06 MMM Jun MMMM June yy 24 yyyy 2024 Time Format Codes

Custom time formats for the Power Automate formatDateTime function can be created using these format codes. Format Code Output h 2 hh 02 HH 14 mm 15 ss 45 tt PM Did You Enjoy This Article? 😺

Subscribe to get new Copilot Studio articles sent to your inbox each week for FREE Enter your email address Sign Me Up Questions?

If you have any questions or feedback about Power Automate FormatDateTime Function Examples please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion. Matthew Devaney Power Automate

Save Docusign Document To SharePoint With Power Automate

Share this

Tagged

Power Automate

Have a Microsoft 365 topic idea?

Share article suggestions, community session ideas, corrections, or real-world scenarios for future nextM365 learning notes.

Suggest a topic

Keep learning Microsoft 365

Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.

Continue learning

Next action

What to do next

Browse all tutorials →