Power Automate (WDL) function
formatDateTime — Power Automate (WDL) function reference
Format a timestamp.
Syntax
wdl
formatDateTime(timestamp, [format], [locale])
Examples
wdl
formatDateTime(utcNow(), 'dd MMM yyyy')
→ "13 Jun 2026"
wdl
formatDateTime(item()?['DueDate'], 'yyyy-MM-dd')
→ "2026-07-08"
Locale affects the rendered day/month names.
wdl
formatDateTime(utcNow(), 'dddd, dd MMMM yyyy', 'en-GB')
→ "Wednesday, 08 July 2026"
Common mistakes & gotchas
- format uses .NET custom date/time format strings ('yyyy-MM-dd', 'dd MMM yyyy'), not the picker-style formats used elsewhere in Power Platform.
- Without an explicit format argument, formatDateTime() returns full ISO 8601 with the original precision/offset, which can surprise anyone expecting a short date.
Related Workflow Definition Language functions
From Date & time