web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Format multiple Excel ...
Power Automate
Answered

Format multiple Excel date fields of a column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey PAD Enthusiasts 😊,
when reading an Excel table in which there are several date fields, the date is read an write back in a new Excel table in this format:

 

Wilson4Ever_0-1658917082880.png

How do I manage to rewrite the complete date fields into the following format yyyy/MM/dd ?

 

I did it with this method, but of course this only works for one line.

 

Wilson4Ever_1-1658917188813.png

For each method did not work for me either. Does anyone have a best practice case?

 

Greetings from Lake Constance

Rookie PAD Chris

I have the same question (0)
  • AS-06081019-0 Profile Picture
    1,738 Super User 2024 Season 1 on at

    Could you please try getting the row count and use it in for each. It should solve your purpose. 

  • Verified answer
    rolign Profile Picture
    on at

    If I understand your case correctly, this should be working (copy-paste in the flow and adjust as necessary)

     

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''test.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: False RangeValue=> ExcelData
    SET ExcelRow TO 0
    LOOP FOREACH CurrentItem IN ExcelData
    SET Date TO CurrentItem[2]
    Text.ConvertDateTimeToText.FromCustomDateTime DateTime: Date CustomFormat: $'''yyyy/MM/dd''' Result=> FormattedDateTime
    Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: FormattedDateTime Column: $'''C''' Row: ExcelRow
    Variables.IncreaseVariable Value: ExcelRow IncrementValue: 1
    END

  • AS-06081019-0 Profile Picture
    1,738 Super User 2024 Season 1 on at

    Yes. This should work.
    Let me know if you encounter any error.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you very much for the support.

    We had the following Excel file. An export from an application that provides employee absences.

    Wilson4Ever_1-1659522728498.png

    These need to be read into another application and in the following format.

    Wilson4Ever_2-1659522772710.png

    This PAD Flow now implements this perfectly.

    We are really very happy with it. Our first RPA that saves 10 min of working time every day.

    Wilson4Ever_0-1659522654687.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard