Power Automate UtcNow Function Guide | Many Examples

Power Automate UtcNow Function

The Microsoft Power Automate utcNow function returns the current UTC time and date. UTC stands for Coordinated Universal Time.

Be aware that you do not get the date and time of your timezone unless your timezone matches UTC. You will learn how to adjust the UTC time to your timezone in this article.

Furthermore we address common formatting issues with the utcNow function.

But first take a look at the function itself.

Power Automate utcNow Function

power automate utcnow function
utcNow Power Automate

The Power Automate utcNow Function returns the current UTC date and time.

Syntax

utcNow('<format>')

Input parameters

  • format (optional): A format string that defines in which way the returned date time should be formatted. (Default fromat:  “yyyy-MM-ddTHH:mm:ssZ”; Example: “2022-08-11T14:21:05.2031122Z”)

Return value

  • A date string based on the given format.

Power Automate utcNow Function Examples

utcNow()
=> 2022-07-17T20:49:20.3188464Z

utcNow('yyyy-MM-dd')
=> 22022-08-11

Power Automate utcNow Timezone

As already mentioned in the introduction, chances that UTC matches your timezone are really low. So now let’s find out, how to get the current time of your timezone.

You can use the convertTimeZone function for this. Simply pass utcNow() to it, your timezone and the needed format. Like this:

convertFromUtc(utcNow(), 'Central Standard Time (Mexico)')

Looking for your timezone? Take a look at the list of timezones to find the timezone you need.

Power Automate Current Time Action

Just for the sake of completeness, I like to mention that there is Current time action, which basically does the same as the utcNow function.

Here you can find the Current time action:

Power Automate UtcNow vs Current time Kopie 1
Power Automate Current time action – where to find

The action is self is pretty simple:

Power Automate Current time action 2
Power Automate Current time action

Reference: Power Automate utcNow Format

The format string which can be passed to utcNow is not unique to the utcNow function. So what you learn here can be used with other date functions.

You find the formats explained for every date and time component below.

Year

FormatDateFormatted Date
y0001-03-011
y2000-11-150
y2022-03-0122
yy0001-03-0101
yy2000-11-1500
yy2022-03-0122
yyy0001-03-01001
yyy0090-03-01090
yyy2022-03-012022
yyyy0001-03-010001
yyyy2022-03-012022
yyyyy2022-03-0102022

Month

FormatDateFormatted Date
M2022-03-013
M2022-11-1511
MM2022-03-0103
MM2022-11-1511
MMM2022-03-15Mar
MMMM2022-03-15March

Days

FormatDateFormatted Date
d2022-03-011
d2022-03-1515
dd2022-03-0101
dd2022-03-1515
ddd2022-03-15Tue
dddd2022-03-15Tuesday

Hours

FormatTimeFormatted Time
h01:301
h11:3011
hh01:3001
hh11:3011
hh13:3001
H01:301
H13:3013
HH01:3001
HH13:3013
t01:30A
t13:30P
tt01:30AM
tt13:30PM

Minutes

FormatTimeFormatted Time
m01:022
m11:3030
mm01:0202
mm11:3030

Seconds

FormatTimeFormatted Time
s01:00:022
s11:00:3030
ss01:00:0202
ss11:00:3030

Leave a Comment

Your email address will not be published. Required fields are marked *