⚡ Power Automate 📊 Working Hours Series — Part 2 December 10, 2025 · 6 min read

Power Automate Date Formatting:
How to Use formatDateTime (With Examples)

Ever had Power Automate write a date like 2025-11-20T05:11:55.8785748Z into your Excel sheet? In this guide, you'll learn how to use the formatDateTime function to turn that robotic string into something clean, readable, and professional.

The Problem: Unreadable Timestamps

When Power Automate captures a timestamp, it uses the ISO 8601 format by default — a standard that's great for computers, but completely unreadable for humans.

❌ Default output (unreadable)
2025-11-20T05:11:55.8785748Z
✅ After formatting (clean)
20 November 2025 — 05:11 AM

The fix is the formatDateTime function in Power Automate. It takes any date/time value and reformats it to look exactly the way you want.

Understanding the formatDateTime Function

The syntax is straightforward:

formatDateTime(value, 'format', 'locale')

Three ingredients:

💡
Where to use this: In Power Automate, instead of clicking Insert Dynamic Content, click Insert Expression and type the formatDateTime function manually. Then select your Timestamp field from the Dynamic Content panel.

Practical Examples

Example 1 — Simple date (day/month/year)

formatDateTime(triggerOutputs()?['headers']?['x-ms-user-timestamp'], 'dd/MM/yyyy')
// Output: 10/12/2025

Example 2 — Full date with month name and locale

formatDateTime(triggerOutputs()?['headers']?['x-ms-user-timestamp'], 'd.MMMM yyyy', 'en-US')
// Output: 10.December 2025

Example 3 — Date with time

formatDateTime(triggerOutputs()?['headers']?['x-ms-user-timestamp'], 'dd/MM/yyyy HH:mm', 'en-US')
// Output: 10/12/2025 09:30

Format Code Reference Table

Mix and match these codes in the format string to get exactly the output you need:

Code What it represents Example output
⏱ Time Formats
hHour (12-hour, no leading zero)3
hhHour (12-hour, with leading zero)03
HHHour (24-hour, with leading zero)15
mmMinutes (with leading zero)30
ssSeconds (with leading zero)40
ttAM / PM indicatorPM
📅 Date Formats
dDay of month (no leading zero)2
ddDay of month (with leading zero)02
dddAbbreviated day nameThu
ddddFull day nameThursday
MMonth number (no leading zero)1
MMMonth number (with leading zero)01
MMMAbbreviated month nameJan
MMMMFull month nameJanuary
yyTwo-digit year25
yyyyFour-digit year2025
🎯
Experiment freely. There are hundreds of valid combinations. Try building your own format string in the Power Automate Expression editor — it shows a live preview as you type.

Series Navigation

← Previous
Part 1: Track Employee Hours with Power Automate

Need Help with Power Automate?

Our certified Microsoft 365 specialists configure Power Automate flows for your business — in plain English, with no jargon.

Get a Free Consultation

More Power Automate Articles

⏱️ Part 1
Track Employee Hours with Power Automate
📎 Power Automate
Auto-Save Email Attachments to OneDrive