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

Community site session details

Session Id :
Power Automate - Using Connectors
Answered

Converting the date format when writing to excel

(0) ShareShare
ReportReport
Posted on by Moderator

Hello,

 

I am trying to write the date on which a Sharepoint item was created to an excel table.

I want it to look like the top one in the picture below, but it comes up like the bottom one and in excel I cannot reformat it to a date. 

schwibach_0-1610395951930.png

 

Please help!

I have the same question (0)
  • v-litu-msft Profile Picture
    on at
    Re: Converting the date format when writing to excel

    Hi @schwibach,

     

    You could use the formatDateTime() function convert the date time to the formate you like when you add a row into a table or update a row, for example:

    formatDateTime(utcNow(),'dd.MM.yyyy hh:mm')

    Screenshot 2021-01-12 101342.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • schwibach Profile Picture
    Moderator on at
    Re: Converting the date format when writing to excel

    Hello,

     

    thanks a lot! It displays things correctly in excel.
    However, the dates don't work in the same way as the ones I get from Forms when it gives me the date and time submitted.

    As far as the data goes, it seems to me that what I get in excel from Forms is a number that Excel converts to a date.

    And Powerautomate now sends an already converted date, that excel display correctly, but does not calculate correctly... if that makes any sense.

     

    The last entry in the following table comes from the Flow I built with your formula (thanks again for that!)
    The other entries come from a flow that adds rows whenever a form is submitted to Forms.

    I have conditional formatting in that table that will highlight entries that are above average (as in: newest) in green and the last 10 % red, so the person monitoring can tell at a glance whom they should maybe ask to update their numbers. 

     

    schwibach_0-1610491797134.png

    This is really a minor thing, but now that I'm getting into dates, I'm curious if it can be resolved.

     

    For some background: I am giving 8 different groups of people two options to submit data to that table. The heads of the organisation will be able to use a powerapp to submit data and check when and what their organisation submitted last. And they can delegate submitting data to other people by giving them the link to their organisation-specific Form. 

  • schwibach Profile Picture
    Moderator on at
    Re: Converting the date format when writing to excel

    I thought about it a bit more.

    When I change the format (in the Excel cell) of the date that we added from SharePoint with Powerautomate, it still comes up as a date, whereas the other cells will come up as something like 44209,22

     

    Is it possible to make powerautomate send the date and time as the type of number that Excel will understand. I could then have Excel display it as a date and use it to calculate.

    Then it should work correctly.

  • v-litu-msft Profile Picture
    on at
    Re: Converting the date format when writing to excel

    Hi @schwibach,

     

    PowerAutomate couldn't update calculate column in Excel table, after append value to calculate column, the formula wouldn't work.

    And sorry it is impossible to send the date and time as date type of number to Excel. Only supported is text date.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Verified answer
    schwibach Profile Picture
    Moderator on at
    Re: Converting the date format when writing to excel

    Ok, 
    so I ended up finding a solution.
    Here it is. In Excel you reference the cell that you got into excel from SP and use the following formula in a cell:
    =DATEVALUE(LEFT(yourSharePointDateGoesHere;10))+TIMEVALUE(MID(yourSharePointDateGoesHere;12;8))

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 647 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 350 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard

Featured topics