Power Automate utcNow() Function [With Various Formats]

Do you know how to use the Power Automate utcNow() function? If not, then check out this tutorial.

I will describe the Power Automate utcNow() function and its syntax in this tutorial. Furthermore, I will elaborate on a few examples of various formats the utcNow() function can take.

The utcnow() function in Power Automate is a frequently utilized function that is useful to provide the current date and time or a current timestamp in the UTC timezone, which means Coordinated Universal Time.

Power Automate utcNow() Function

Power Automate utcNow() function gives the current date and time output in UTC format. UTC refers to Coordinated Universal Time.

The utcNow() function resembles the Now() function in SharePoint and PowerApps.

It’s important to note that obtaining the date and time of your timezone requires a match with UTC.

This is the overview of the Power Automate utcNow() function.

Power Automate utcNow() Function Syntax

This is the Power Automate syntax for the utcNow() function, as in the code below.

utcNow('format')

Parameters:

  1. utcNow = It is mandatory to give utcNow() to get the current date and time.
  2. Format = It is an optional field where a user can provide a custom timestamp format. If not provided, it will take the default format[yyyy-MM-ddTHH:mm: ss.fffffffK].

This function can specify a different format with the [format] parameter of the current date and time.

The Power Automate utcNow() function output will give the current date and time as a string datatype.

Example:

For example, I will give the utcNow() with the dd/MM/yyyy format.

utcNow('dd/MM/yyyy')
  1. utcNow: Current date and time.
  2. dd/MM/yyyy: Current date and time format.

Here will be the output as of 02/01/2024.

How to get current date using Power Automate utcNow() function

This is the overview of Power Automate’s utcNow() function syntax.

Power Automate utcNow() in Day-Month-Year Format

I will show a step-by-step guide to get the current date in a day-month-year format.

In Power Automate, the utcNow() function is available to retrieve the current date and time in a flow. The table below will represent different formats that can be used to convert the default format of the current date and time into a customized format.

FormatDescriptionOutput
yyyyyear2023
MMMMMonth nameOctober
ddday11
yyyy-MM-ddYear-Month-Day2023-10-12
yyyy-MM-ddTHH:mm:ssZDate and Time2023-10-12T14:30:00Z
HH: mm12 hour time indicator with AM/PM02:30PM
02:30 PM24-hour time indicator14:30
MMM dd,yyyyMonth Day, YearJul 16, 2023

1. Browse Power Automate with your Microsoft credentials -> In the Power Automate Home page, tap +Create -> Select Instant cloud flow -> Provide a flow name & select trigger Manullay trigger a flow -> Tap Create button.

2. On the instant cloud flow, add an Initialize variable flow action and fill in the below-mentioned details:

  • Name: Provide a name for the variable as utcNow().
  • Type: Set data type as ‘String’ from the drop-down.
  • Value: Provide the expression that is given in below code:
utcNow('dd-MM-yyyy')

Then, Click OK.

Power Automate utcNow() function

3. Next, add a Compose flow action and select the input that is generated from the initialized variable as shown below:

  • Inputs: Click the field -> Take a utcnow() variable from the dynamic content.
@{variables('utcNow()')}
Power Automate utcNow() expression

4. After completing the flow, Save the flow. Then, test the flow manually.

5. The compose flow action indicates that the utcNow() function will extract the current date and time in the given format.

  • The output returned will be 02-01-2024 [Today’s date].
Power Automate utcNow() in Day-Month-Year Format

This is how to get the current date and time in a specific format from the Power Automate utcNow() function.

Power Automate utcNow() in Year-Month-Day Format

In this section, I will describe how to get the current date in year-month-day format inside a flow.

Follow the above instructions to do this example. Only change the expression in the initialized variable.

1. In the initialized variable, select the Value that is given in the below code:

  • Value: Select field -> Click on Expression -> Give the expression.
utcNow('yyyy-MM-dd')

Then, Click OK.

Power Automate utcNow() in Year-Month-Day Format

2. To see the output, add Compose action and take Inputs from variables as shown below image:

@{variables('utcNow()')}
utcNow() expression in Power Automate

Output:

3. After saving and testing the flow, you can see the current date in year-month-date format in compose outputs.

How to use Power Automate utcNow() function

This is about how to retrieve Power Automate utcNow() in year-month-day format.

Power Automate utcNow() in Date with Time

Let’s see another example of the Power Automate utcNow() function with date and time.

Follow the below given steps:

1. In the Initialized variable flow action, select the below details:

  • Name: Enter the name of a variable as utcNow().
  • Type: Select datatype from drop-down as String.
  • Value: Give the below expression in the value section.
utcNow('yyyy-MM-ddTHH:mm:ss')

After that, Click OK.

Microsoft Power Automate utcNow() function

2. Then, add a Compose action and set the below details:

  • Inputs: Select field -> Click output under variables of dynamic content.
@{variables('utcNow()')}
Power Automate utcNow() format in Date with Time

Output:

3. After testing the flow, you can see that utcnow() will retrieve the date and time in the given format using Power Automate.

  • The output of the Power Automate utcNow() expression will be 2024-01-02T09:45:41.
How to use utcNow() function expression in Power Automate

This is how to get the Power Automate’s utcNow() in date and time format.

Power Automate utcNow() in Day of the week, Month day, Year Format

Here, I will show you how to format the utcNow() in the day of the week, Month day, and Year format.

Go through the below steps:

1. In the Initialized variable flow action, set the Value as given in the below code:

  • Name: Enter the name of a variable as utcNow().
  • Type: Select datatype from the drop-down as a string.
  • Value: Give the below expression in the value section.
utcNow('dddd,MMMM dd,yyyy')

Then, select OK.

Power Automate utcNow() function format

2. Then, take out a Compose action to check the output of utcNow() as shown below:

  • Inputs: Select from variables of the dynamic content of an initialized variable.
@{variables('utcNow')}
Microsoft Power Automate utcNow() expression

3. After saving the flow, run it manually. Then, the Power Automate’s flow will display the result of the utcNow() function format in the compose flow action.

Result: The result will be Tuesday, January 02, 2024.

Power Automate utcNow() in Day of the week, Month day, Year Format

Power Automate utcNow() in Month Day, Year Format

Let’s look at how to get the current date in month, day, and year format.

Do follow the steps of the Power Automate flow:

1. Set the Value as mentioned code in the initialized variable along with the below details:

  • Name: Provide a name manually for the variable.
  • Type: Select datatype as ‘String‘ from drop-down.
  • Value: Select the field -> Click Expression -> Provide the expression.
utcNow('MMM dd,yyyy')

Then, Choose OK.

Power Automate utcNow() in Month Day, Year Format

2. After that, Save flow -> Then, Test the flow -> Select Manually -> Click Run flow.

3. The result of the utcNow() function will show the desired format in the compose outputs of Power Automate flow as displayed in the screenshot below:

Result: Current Date Jan 02, 2024.

How to get Power Automate utcNow() in Month Day, Year Format

This is about how to get utcNow() in Month Day, Year format in Power Automate.

Power Automate utcNow() in dd/MM/yyyy with 12 Hours of Time

I will describe one more example of the Power Automate utcNow() in dd/MM/yyyy with 12 hours of time format.

For that, Check out the steps mentioned below:

1. In the initialized set, the expression provided in the code below is in the Value column section.

  • Name: Take a name manually for the variable.
  • Type: Select datatype as ‘String‘ from drop-down
  • Value: Select the field -> Click Expression -> Provide the expression.
utcNow('dd/MM/yyyy hh:mm tt')

After taking the expression, Click OK.

Power Automate utcNow() format in12 Hours of Time

For yyyy/MM/dd format with 12-hour time:

formatDateTime(utcNow(),’yyyy/MM/dd hh:mm tt’) – With AM/PM Indicator
formatDateTime(utcNow(),’yyyy/MM/dd hh:mm’)- Without AM/PM Indicator

2. After completing the flow, save and test it. When the flow runs successfully, it will display a notification as ‘Your flow ran successfully.

3. Then, open the compose flow action to see the result received from the Power Automate’s utcNow() function. Then, the result will be 02/01/2024 10:10 AM.

Output:

Power Automate utcNow() with 12 Hours of time

This is how to use Power Automate’s utcNow() function to get the time in a 12-hour format.

Power Automate utcNow() in dd/MM/yyyy with 24 Hours of Time

Moreover, I will show you the final example on Power Automate utcNow() in dd/MM/yyyy with 24-hour time format.

To work with this, follow the below-given steps:

1. In the Initialized variable, set the below-given details: Name, Type, and Value.

  • Name: Enter a name for the initialized variable.
  • Type: Set the datatype as ‘String‘ from the drop-down
  • Value: Click field -> Select Expression -> Provide the expression.
utcNow('dd/MM/yyyy HH:mm:ss tt')

After the expression, Click OK.

Microsoft Power Automate utcNow() function expression

2. After the Power Automate flow gets ready, Click Save. Then, Test it manually.

3. When the flow runs successfully, then you can see the result of a utcNow() function in a specific date format in the compose outputs as shown below:

Output:

The result of the Power Automate utcNow() expression gives 02/01/2024 10:16:32 AM.

Power Automate utcNow() in 24 Hours time

This is how to get the current date and time in various formats using Power Automate.

Conclusion

I hope you got to know how to get the current date in Power Automate. And also how to customize various date and time formats using the utcNow() function in Power Automate.

I have covered the topics below on the Power Automate utcNow() function:

  • Power Automate utcNow() in day-month-year format
  • Power Automate utcNow() in year-month-day format
  • Power Automate utcNow() in date with time
  • Power Automate utcNow() in the day of the week, month day, year format
  • Power Automate utcNow() in month-day, year format
  • Power Automate utcNow() in dd/MM/yyyy with 12 hours of time
  • Power Automate utcNow() in dd/MM/yyyy with 24 hours of time

Furthermore, you may like some more Power Automate tutorials: