How to Get Current Date in Power Automate + 7 Examples

Recently, I developed a travel application where the client must get the current date in Power Automate and display it in an email.

In this article, I will explain how to get current date in Power Automate using the utcNow() function. In addition to that, I will also describe how to customize different formats of date and time as mentioned below:

  1. Power Automate get the current date in the Date-Month-Year format and Year-Month-Date format
  2. Get the current date with time in Power Automate
  3. Get the current date in Day of the week, Month day, Year (Ex: Thursday, June 11, 2023)
  4. Get a current date in Month Day, Year format (Ex: Oct 16,2023)
  5. Power Automate how to retrieve the current date in MM/dd/yyyy with 12 hours of time indicator
  6. Obtain the current date in dd/MM/yyyy format with a 24-hour time indicator
  7. Get the current date in yyyy/MM/dd Format in 12 hour time indicator

Get Current Date in Power Automate

When working with date and time values in Power Automate, we can see that they are not in a specific format according to our requirements. For that, Microsoft provides the formatDateTime() function to customize our required date format.

The below table will represent some of the different formats that can be used in the formatDateTime() function:

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
HH:mm24-hour time indicator 14:30
MMM dd,yyyyMonth Day, YearJul 16, 2023

A step-by-step guide to get the current date in different formats of Power Automate flow:

I have created an instant cloud flow in Power Automate for all the examples.

Power Automate Get the Current Date in Day-Month-Year Format

Follow the instructions below to get the current date in the day-month-year format.

  • On the instant cloud flow, add initialize a variable and fill in the below-mentioned details:
    • Name: Provide a name for the variable
    • Type: Set data type as ‘String’ from the drop-down
    • Value: Provide the expression that is given in below code:
formatDateTime(utcNow(),'dd-MM-yyyy')
Get Current Date in Power Automate
  • Next, add a Compose data operation and select the input that is generated from the initialized variable as shown below:
@{variables('Current Date')}
Create a custom Team web part using SharePoint server object model and bootstrap

Output:

Obtain Current date and year in Power Automate flow

Power Automate Get the Current Date in Year-Month-Date Format

formatDateTime(utcNow(),'yyy-MM-dd')
Obtain Current date and year in Power Automate
  • To see the output, add Compose action and take Inputs from variables as shown below image:
@{variables('Get Current Date')}
Get Current date in various formats in Power Automate

Output:

Retrieve current date in Power Automate

Power Automate Get the Current Date with Time

  • In the initialized variable, select the below details:
    • Name: Enter the name of a variable
    • Type: Select datatype from drop-down
    • Value: Give the below expression in the value section.
formatDateTime(utcNow(),'yyyy-MM-ddTHH:mm:ss')
How to get current date in various formats in Power Automate
  • Add a Compose action and set the below details:
    • Inputs: Select output under variables of dynamic content.
@{variables('Get Current Date and Time')}
How to get the current Date Time in Power Automate

Output:

Get current date and time function in cloud flows

Power Automate Get Current Date in Day of the week, Month day, Year Format

  • In the initialized variable, set the Value as given in the below code:
formatDateTime(utcNow(),'dddd,MMMM dd,yyyy')
Extract Day of week from dates in Power Automate
  • Take a Compose action to check the output as shown below:
    • Inputs: Select from variables of dynamic content
@{variables('Current Date')}
Create a variable to get the current date in Power Automate

Result:

Power Automate Return current date in various formats

Power Automate Get Current Date in Month Day, Year format

  • 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
formatDateTime(utcNow(),'MMM dd,yyyy')
Return current date in various formats in Power Automate
  • To display the output, add a Compose data operation as shown below:
@{variables('Current Date')}
Simplify Date and Time in Power Automate

Result:

Simplify current Date and Time in Power Automate flow

Power Automate Get the Current Date in MM/dd/yyyy with 12 Hours Time

  • Set the expression that is provided in the code below in the Value column section:
formatDateTime(utcNow(),'MM/dd/yyyy hh:mm tt')

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
Power Automate get current date in various formats
  • To see the output, add a Compose action as shown below:
@{variables('Current Date')}
Power Automate get the current date in Microsoft flow

Output:

Power Automate flow to get the current date in Microsoft flow

Power Automate Get the Current Date in dd/MM/yyyy with 24-hour Time

  • In the Initialized variable, set the below-given details:
    • Name: Give a name for the initialized variable.
    • Type: Set the datatype as ‘String‘ from the drop-down
    • Value: Provide the value as mentioned in the below code.
formatDateTime(utcNow(),'dd/MM/yyyy HH:mm:ss tt')
Use of Date and Time expressions in Power Automate
  • Add a Compose action to check the output and give below details:
    • Inputs: Select variables of an initialized variable from the dynamic content.
@{variables('Current Date')}
Power Automate get the current date with 24hour time format in Microsoft flow

Output:

How to get current date with 24 hour time format

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

Conclusion

I hope you know how to get the current date in Power Automate and how to customize various date and time formats using the formatDateTime function.

You may also like:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…