Date & Time

formatDateTime

Formats a timestamp as text in the pattern you choose.

Syntax

formatDateTime('<timestamp>', '<format>'?, '<locale>'?)

Parameters

timestamp
The date/time to format.
formatoptional
A .NET date format, such as "dd/MM/yyyy" or "D".
localeoptional
Language for month and day names, such as "fr-FR".

Examples

  1. formatDateTime(utcNow(), 'dd/MM/yyyy')

    '23/10/2026'

  2. formatDateTime(utcNow(), 'dddd, MMMM d, yyyy h:mm tt')

    'Friday, October 23, 2026 2:05 PM'

  3. formatDateTime('2026-10-23', 'dd MMMM yyyy', 'fr-FR')

    '23 octobre 2026'

Maker notes

  • Capital MM is the month; lowercase mm is minutes. HH is 24-hour time; hh is 12-hour.
Official documentation on Microsoft Learn

↑ ↓ moveEnter open