Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Dates being transposed when taking an MS Forms date string into a flow to populate an Excel Row.

(0) ShareShare
ReportReport
Posted on by 12

I am using power automate to take output from MS forms and send it to an excel spreadsheet.  One of the questions in the forms asks the user completing the form to copy a date string in the format dd/mm/yyyy from an access database into the form response field.  This field is then passed through to Excel when the forms is submitted.  

 

Everything appeared to be working well but I have noticed recently that, at some point in the process, if the first value in the string (dd) is less than or equal to 12 it is assumed to be a month and is moved to the second field when passed to excel.  So 10/1/2020 is transposed to 1/10/2020 in excel.  This is incorrect.  However, if the first value is greater than 12 it is left in place. So 13/1/2020 stays as 13/1/2020 when inserted into excel.

 

I need to find a way of maintaining the original format of the date when it is passed through to excel.  Any ideas appreciated. 

  • RichardWest56 Profile Picture
    12 on at
    Re: Dates being transposed when taking an MS Forms date string into a flow to populate an Excel Row.

    @Nived_Nambiar  hi Nived,  Thank you again for all your help with this. I think though, that, given our limited technical knowledge, I have found a ‘no code’ solutions to this issue.  It’s frankly one that I feel a bit silly I didn’t notice before.  I was under the impression that the MS Forms date picker didn’t allow you to paste in dates to it.  I found today that I was wrong - and, as the data picker passes the date to excel in a form it does understand, I am planning on going with this as a solution to the problem.  

     

    Given your seemingly boundless knowledge in this area I feel sure we will cross paths again and I look forward to it. 

     

    Kind regards,

     

    Richard.

  • Nived_Nambiar Profile Picture
    17,519 Super User 2025 Season 1 on at
    Re: Dates being transposed when taking an MS Forms date string into a flow to populate an Excel Row.

    Hi @RichardWest56 

     

    That's why i have passed the date in format of MM/dd/yyyy so that excel can intepret it. [ my first post ] 

     

    To pass date in yyyy/MM/dd

     

    we can change the position in the join funcyion like below

     

    join(createArray(split(outputs('Get_response_details')?['body/rb4debda0986e45a9a6713107f8d4ac37'],'/')?[2],split(outputs('Get_response_details')?['body/rb4debda0986e45a9a6713107f8d4ac37'],'/')?[1],split(outputs('Get_response_details')?['body/rb4debda0986e45a9a6713107f8d4ac37'],'/')?[0]),'/')

     

     

    Hope this helps 🙂

  • RichardWest56 Profile Picture
    12 on at
    Re: Dates being transposed when taking an MS Forms date string into a flow to populate an Excel Row.

    I am afraid I am still struggling with this.  Perhaps more context would help.  With the flow I have I am importing about 20 fields from MS forms into Excel via Power Automate.  I have attached my current flow below.    2 of these fields are the date text fields that are causing me all the trouble.  So I need a way of formatting these two fields in a way that Excel can read and display them correctly.  The two fields are displayed in the add a row into a table component of the flow - together with the remaining 18 fields.

     

    RichardWest56_0-1681129066312.png

    Interestingly after a bit of research I have found that I am not the only one having this issue.  This link gives a thread where people were having the same problem and found that it wasn't power automate that was causing the problem but excel in its interpretation of the output from power automate.  The workaround that was found was to output the data from Power Automate in yyyy/MM/dd format. 

     

    So now my question is please can anyone tell me how do I go about formatting the two date strings into this format as part of the current flow?  

     

    Thanks in advance for any suggestions.

  • RichardWest56 Profile Picture
    12 on at
    Re: Dates being transposed when taking an MS Forms date string into a flow to populate an Excel Row.

    Hi @Nived_Nambiar Thanks again so much for your clarifications.  I really appreciate you taking the time to help.  I am hoping to try this out tomorrow and will let you know how I get on.  All the best, Richard.

  • Verified answer
    Nived_Nambiar Profile Picture
    17,519 Super User 2025 Season 1 on at
    Re: Dates being transposed when taking an MS Forms date string into a flow to populate an Excel Row.

    Hi @RichardWest56 

     

    Please find the answers to your questions

     

    1.  You have to enter the expression like below

    Nived_Nambiar_0-1681020237808.png

     

    Here i am entering to a Data field.

     

    2. Regarding string body/rb4debda0986e45a9a6713107f8d4ac37 the unique value rb4debda0986e45a9a6713107f8d4ac37 represents question of the form , for every question, a unique code is assigned. in you case, you have to select the required dynamic content like below

    Nived_Nambiar_1-1681020398100.png

     

    Here in my case Data dynamic content, so while using split function , you can pass dynamic content Data by clicking on Data dynamic content like below after writing function and then select ok 🙂

    Nived_Nambiar_2-1681020479051.png

     

     

    3) Yes in such case, there is no need to split, you can directly pass the Data dynamic content to excel action

     

    Nived_Nambiar_4-1681020823291.png

     

     

  • RichardWest56 Profile Picture
    12 on at
    Re: Dates being transposed when taking an MS Forms date string into a flow to populate an Excel Row.

    Hi @Nived_Nambiar Thanks very much for your reply.  

    I have three questions on your recommendation, and please excuse my simplistic approach to this as I am a relative newcomer to power automate and definitely more at the ‘no-code’ rather than ‘low-code’ end of the spectrum!: 

    1. Where would I write this?  In the mapping dialog of the flow where the fields from MS forms are mapped to the columns in excel?    

    2. The string 'body/rb4debda0986e45a9a6713107f8d4ac37' that you use - where do I get this from? 

    3. As I want the date string in its original format i.e. dd/mm/yyyy, I assume I would need do the split operation in the order 0,1,2?

     

    Once again thanks for your help?

  • Nived_Nambiar Profile Picture
    17,519 Super User 2025 Season 1 on at
    Re: Dates being transposed when taking an MS Forms date string into a flow to populate an Excel Row.

    Hi @RichardWest56 

     

    While writing to excel you can write the date string in MM/dd/yyyy format using split operation like below

     

    join(createArray(split(outputs('Get_response_details')?['body/rb4debda0986e45a9a6713107f8d4ac37'],'/')?[1],split(outputs('Get_response_details')?['body/rb4debda0986e45a9a6713107f8d4ac37'],'/')?[0],split(outputs('Get_response_details')?['body/rb4debda0986e45a9a6713107f8d4ac37'],'/')?[2]),'/')

     

    This will give the date in excel in correct month in excel

    Nived_Nambiar_0-1681009330702.png

     

    Hope this helps 🙂

    Mark it as solution if it resolves your query !

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,679 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow