Do you want to convert the string to date in Power Automate? In this Power Automate tutorial, we will see how to convert string to date in Power Automate.
In Power Automate, there can be data that appears to be a date but is actually just regular text.
If you want to perform like changing the date’s format or adding more days to it, you have to change that string into a proper date format that Power Automate can understand. Otherwise, you will come across the below error after running the flow.

Here, we will cover the topics below
- How to convert string to date in Power Automate.
- How to convert string to date using the ParseDateTime function in Power Automate
Let’s see how to convert string to date in Power Automate. The string will formatted to the proper date format i.e., ISO 8601 format.
Convert string to date in Power Automate
Here, we will see how to convert a string to date in Power Automate.
We will take a date string and we will convert that string to date format, which satisfies ISO 8601 format.
To do this in Power Automate, follow the below steps:
1. Open Power Automate Cloud, then click on +Create -> select Instant Cloud Flow.

Then, provide a flow name and select Manually trigger a flow action. Then click on Create.

Now, you can see the “Manually trigger a flow” action is added to the flow page in Power Automate.

2. We will initialize a string variable; for this, click on +New step -> select Initialize variable action. Then provide the below information:
- Name: Provide the name of the variable
- Type: Provide the type as a string
- Value: Provide the value like below

3. We will split the string to get the date; for this, click on the +New step -> select Compose action. Then provide the below information:
- Inputs: Provide the below expression.
split(split(variables('str'),' ')[0],'/')

4. Now, we will create a date; for this, click on the +New step -> select Compose action. Then provide the below information:
- Inputs: Provide the below expression:
join(reverse(outputs('Compose')),'-')

5. Now save and run the flow manually; you can see the string is converted to date in Power Automate.

This is how to convert string to date in Power Automate.
Convert string to date using ParseDateTime function in Power Automate
Here, we will see how to convert string to date using the ParseDateTime() function in Power Automate.
The parseDateTime() function in Power Automate will take the date string and convert it into date format i.e., ISO 8601 format.
Syntax:
parseDateTime(<timestamp>, <locale>, <format>)
In the above syntax: