Introduction

The utcNow() function returns the current date and time in Coordinated Universal Time (UTC) when the flow runs. It outputs a timestamp which you can use to track when something happened, log events, or format for display.

aa

1. Default Output of utcNow()

If you just use:

Code
utcNow()
  • It returns the full UTC timestamp in ISO 8601 format with milliseconds and a “Z” suffix, meaning Zulu time (UTC).

  • Example:

    Code
    2024-03-18T12:30:45.1234567Z
  • This is useful if you want an exact moment in time and plan to process or store it without formatting.

2. Formatting utcNow() for Different Date and Time Outputs

Often you want to show or use the date/time in a more readable or locale-friendly way. Power Automate lets you format the date/time string by passing a format string inside utcNow() or better yet, use formatDateTime() for more options.

Syntax Recap

  • utcNow('format') – formats the current UTC date/time using the specified pattern.

  • formatDateTime(timestamp, 'format') – formats any timestamp with a pattern (more flexible).

  • formatDateTime(timestamp, 'format', 'locale') – formats with locale-specific settings.

Common Format Patterns Explained

Format SymbolMeaningExample
yyyy4-digit year2024
MM2-digit month (01-12)03
dd2-digit day (01-31)18
ddddFull day nameMonday
MMMMFull month nameMarch
hh12-hour clock hour (01-12)12
HH24-hour clock hour (00-23)15
mmMinutes (00-59)30
ssSeconds (00-59)45
ttAM/PM designatorPM

3. Examples with Explanation

Example A: ISO Date Format (YYYY-MM-DD)

Code
utcNow('yyyy-MM-dd')
  • Outputs: 2024-03-18

  • Good for database fields, logging, or when you want just the date part in standard ISO format.

Example B: US Date Format (MM/DD/YYYY)

Code
utcNow('MM/dd/yyyy')
  • Outputs: 03/18/2024

  • Familiar format for users in the US.

Example C: European Date Format (DD-MM-YYYY)

Code
utcNow('dd-MM-yyyy')
  • Outputs: 18-03-2024

  • Common in Europe and other regions.

Example D: Compact Date Format (YYYYMMDD)

Code
utcNow('yyyyMMdd')
  • Outputs: 20240318

  • Useful for filenames or sorting.

Example E: Full Date with Day Name

Code
utcNow('dddd, MMMM dd, yyyy')
  • Outputs: Monday, March 18, 2024

  • Great for user-friendly displays or emails.

Example F: 12-Hour Time with AM/PM

Code
utcNow('hh:mm tt')
  • Outputs: 12:30 PM

  • Standard time format in US.

Example G: 24-Hour Time with Seconds

Code
utcNow('HH:mm:ss')
  • Outputs: 12:30:45

  • Useful for logs and technical displays.

Example H: Short 24-Hour Time (Hours & Minutes)

Code
utcNow('HH:mm')
  • Outputs: 12:30

  • Compact time display.

4. Locale-Specific Formatting (Using formatDateTime)

Power Automate does not support locale as a parameter in utcNow(), but you can format dates for different locales using formatDateTime() like this:

Code
formatDateTime(utcNow(), 'D', 'en-US')
  • Outputs: Monday, March 18, 2024 in US English locale.

Similarly:

Code
formatDateTime(utcNow(), 'd', 'en-GB')
  • Outputs: 18/03/2024 (British English format)

5. How to Use These Expressions in Power Automate

Step-by-step

  1. Open your flow in Power Automate.

  2. Add a Compose action or use any field that accepts expressions.

  3. Click the Expression tab.

  4. Paste one of the expressions, e.g.:

    Code
    utcNow('yyyy-MM-dd')
  5. Click OK.

  6. Save and run the flow.

  7. Check the output of the Compose action to see the formatted date/time.

6. Troubleshooting Tips

  • Remember that utcNow() always returns UTC time. If you want local time, you need to convert it using convertTimeZone() function.

  • Format strings are case-sensitive (HH vs hh).

  • Use formatDateTime() for locale-specific formatting.

  • If formatting fails, check for typos or unsupported characters.

Conclusion

The utcNow() function in Power Automate returns the current date and time in UTC in ISO 8601 format, useful for timestamping, logging, and time-based flow actions consistently across time zones.