Format date to iso 8601 in Power Automate

ISO 8601 is an international standard for describing dates, times, and durations in a clear and unambiguous format. The format is “YYYY-MM-DDTHH:MM:SS,” with “T” separating the date and time components.

So, The ISO 8601 format is often used in Power Automate for working with date and time values. When working with different time zones and systems within Power Automate workflows, you may assure consistency and avoid ambiguity by using ISO 8601 standards.

In this Power Automate tutorial, we will see how to format date time to ISO 8601 standard using Power Automate or Microsoft Flow.

So here we will cover the below topics:

  • Format SharePoint list date time to ISO 8601 standard
  • Format Excel date time to ISO 8610 standard
  • Format date time to iso 8601 standard

Format SharePoint list date time to ISO 8601 standard

Here we will see how to convert the SharePoint list date time to ISO 8601 standard using Power Automate.

For example, I have a SharePoint list called Meetings, which contains two columns:

  • Title – Single line of text
  • Meeting Date -DateTime
Format date to iso 8601 in Power Automate

Now we will create a flow, that will trigger when an item is created, then we will take the date and time column and change it to ISO 8601 standard.

Step 1: Log in to Power Automate, click on +Create -> select Automated Cloud Flow.

iso 8601 format using power automate

Provide the flow name, and select the trigger action as ‘When an item is created‘. Then click on Create.

iso 8601 format using Microsoft flow

Now you can see the When an item is created trigger action, then provide the below information:

  • Site address: Select or Provide the site address.
  • List name: Select the List name.

Step 2: Next, click on the +New step, select Compose action, then provide the below information:

  • Inputs: Provide the below expressions:
formatDateTime(triggerOutputs()?['body/MeetingDate'], 'yyyy-MM-ddTHH:mm:ssZ')
power automate convert date time to iso 8601 format
power automate convert date time to iso 8601 format

Then click on save and run the flow manually. Create an item in the SharePoint list. you can see the flow ran successfully.

power automate convert excel date to iso 8601

This is how to format date to iso 8601 in Power Automate.

Convert excel date to iso 8601 in Power Automate

Here we will see how to convert excel date and time to ISO 8601 standard using Power Automate.

For example, we have an Excel file, having a list of events. Then excel file contains the below column:

  • Event name
  • Event date
  • Event Time
  • Event date in ISO format
power automate excel datetime format iso 8601 format
convert excel date to iso 8601 power automate

So, here we will take the event date and event time column and convert it to the ISO 8601 standard. Then update it in the Excel file in the ‘Event date in ISO format’ column automatically using Power Automate.

Now set up the Excel file like the above and follow the below steps using Power Automate.

Step 1: Log in to Power Automate, click on +Create -> select Instant Cloud Flow.

iso 8601 format using Microsoft power automate

Provide the flow name, and select the trigger action as ‘Manually trigger a flow‘. Then click on Create.

power automate convert date to iso 8601 format

Now you can see the Manually trigger a flow action is added to the flow.

power automate excel datetime format iso 8601

Step 2: To get all the rows from Excel, click on +New step -> select ‘List rows present in a table‘ action. Then provide the below information:

  • Location: Select the Location from the dropdown.
  • Document Library: Select the Document Library.
  • File: Select the Excel File
  • Table: Select the Table

Then Click on ‘Show advanced options’.

  • Date Time Format: Select the date time format as ISO 8601.
Microsoft power automate excel datetime format iso 8601
Microsoft power automate excel datetime format iso 8601

As we have chosen the format ISO 8601, it will work if we have a single Date and Time column. As we have two different columns for date and time, so for this we need to contact the date-time column and then format it to ISO 8601.

For example, Excel will return the event date as ‘2023-06-22T00:00:00.000Z’ and event time as ‘1899-12-30T12:30:00.000Z’ but we will convert it to this format ‘2023-06-22T12:30:00.000Z’.

Step 3: Next click on +New step -> select ‘Compose‘ action, then provide the below information:

  • Inputs: Select Event Date from dynamic content. It will automatically add Apply to each action.

Similarly, add another compose action and then select Event time as Inputs.

After that add another compose action -> then in Inputs provide the below expression:

formatDateTime(concat(formatDateTime(outputs('Even_date_from_excel'), 'yyyy-MM-dd'), 'T', formatDateTime(outputs('Event_time_from_excel'), 'HH:mm:ss.000Z')), 'yyyy-MM-ddTHH:mm:ss.000Z')
Microsoft power automate flow excel datetime format iso 8601

Step 4: Now we will update the Excel sheet rows, so click on ‘Update a row’ in Excel. Then provide the below information:

  • Location: Select or provide the Location.
  • Document Library: Select the library.
  • File: Select the Excel file from the dropdown
  • Table: Select Table 1 from the dropdown
  • Key Column: Select the Key column as the Event name from dynamic content.
  • Key Value: Select the Key value as the Event name from dynamic content.
  • Event date in ISO format: Select the above compose output from the dynamic content.
Microsoft flow excel datetime format iso 8601
Microsoft flow excel datetime format iso 8601

Then click on save and run the flow manually, and you can see the flow ran successfully.

Also, you can see the Excel date and time is converted to ISO 8601 format.

convert excel date to iso 8601 power automate

This is how we can format Excel date time to ISO 8610 standard.

Format date time to iso 8601 standard in Power Automate

Here we will see how to format the date and time to iso 8601 standard using Power Automate.

For example, we will create a Manually trigger flow, and we will add 2 fields i.e. ‘Enter date’ and ‘Enter time’. Then we will format the date and time to iso 8601 format.

Step 1: Log in to Power Automate, click on +Create -> select Instant Cloud Flow.

Format date to iso 8601 in flow

Provide the flow name, and select the trigger action as ‘Manually trigger a flow‘. Then click on Create.

convert excel date to iso 8601 power automate

Now you can see the Manually trigger a flow action is added to the flow. Then expand the action, click on Add an Input -> Select Date type and another for time select Text.

power automate date format iso 8601

Step 2: Next click on the +New step and select Compose action. Then provide the below information:

Inputs: Provide the below expression:

formatDateTime(concat(formatDateTime(triggerBody()['date'], 'yyyy-MM-dd'), 'T', formatDateTime(triggerBody()['text'], 'HH:mm:ss.000Z')), 'yyyy-MM-ddTHH:mm:ss.000Z')
date format iso 8601 power automate

Step 3: Now run the flow manually, provide the date and time as input. Now you can see the date and time is formatted to ISO 8601.

power automate convert excel date to iso 8601

Conclusion

In this Power Automate tutorial, we saw how to format date and time to ISO 8601 standard using Power Automate.

We have covered the below topics:

  • Format SharePoint list date time to ISO 8601 standard
  • Format Excel date time to ISO 8610 standard
  • Format date time to iso 8601 standard

You may like the following Power Automate tutorials:

>