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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert number from te...
Power Automate
Unanswered

Convert number from text to datetime

(1) ShareShare
ReportReport
Posted on by

Hello Community!

 

When I add a row to a table using the add a row to a table action, it takes any datetimes I have and turns them into a text format, Ex: 

8/24/2023 7:55:00 PM get turned into 45162.8298611111. Even if I select ISO 8601 as my DateTimeformat, it can not change the text into ISO 8601 format because it does not recognize the text as a valid datetime. 

 

Is there a way to convert text number back into the original date time of 8/24/2023 7:55:00 PM? Im trying to use update a row and use compose actions to formatDateTime(text number) and then select the outputs of the compose action in the field for that text number cell in my table. 

 

Thank you,

Noah Strockbine

 

Categories:
I have the same question (0)
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    What is the problem with the number in Excel 45162.8298611111 being used?

     

    Can you format the number in Excel using the Excel number format?

     

    Excel Number Format.png

  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @Noah100 ,

     

    You can do this in Excel.  If this was helpful, please mark as a solution.

     

    trice602_0-1692988910299.png

     

  • Noah100 Profile Picture
    on at

    @trice602 @wskinnermctc 

    This needs to be automated. This is for a log of completed requests and the row it is adding is the average amount of time it takes to complete each request from other tables within the same workbook. When it takes the datetimes in the add a row action, it converts it into text and it needs to turn it back into a datetime within the same flow.

  • Noah100 Profile Picture
    on at

    @trice602 @wskinnermctc 

    Noah100_0-1692989965982.png

    This is what is in my excel table

    Noah100_1-1692990015947.png

    The number in Column1 is what it converts it into once it is in power automate

  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @Noah100 ,

     

    If you can live without the time value, here's one way to convert the serial number to a date value.

     

    trice602_0-1692990924789.png

     

    The key here is you have to work with integers.

     

    trice602_1-1692990975515.png

     

    addDays('1899-12-30',outputs('Compose_2'),'MM/dd/yyyy')
     
    trice602_2-1692991018538.png

     

     

    If this helps you get up and running, please mark as a solution.

     

     

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Please show the steps of your flow, I'm not understanding where the data is coming from and where the data is going to. 

     

    If you are pulling from Excel into Power Automate?

    Excel >>>>>>>>>>>>>>>Power Automate

    8/24/2023 7:55:00 PM >>>>45162.8298611111

     

    (And I if the Excel column has blank rows at the top of the table it is going to cause power automate to think it is a text column even if you select ISO 8601. I have a post about it here.)

     

    Or

     

    Power Automate>>>>>>>>Excel?

    45162.8298611111>>>>>>>8/24/2023 7:55:00 PM

     

    Which one is it that is causing the issue? 

  • Noah100 Profile Picture
    on at

    @wskinnermctc  

    The problem is the first one, Excel to power automate and there are no blank rows.

  • Noah100 Profile Picture
    on at

    @trice602 

    That is great, but unfortunately I have to have the time as well.

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Ok, if you look in that post there is a conversion expression:

    addSeconds('1899-12-30',int(formatNumber(mul(float(item()?['CSVReportLastUpdate']),86400),'0')))

     

    But that doesn't make sense if there are no blank rows and it is still recognizing the data as text. (Even though there are clearly text and blank rows in your screenshot Column 1, which would cause this problem.)

    If you select the dropdown ISO 8601 when getting rows from Excel, it should convert them into full date time instead of Serial.

    wskinnermctc_0-1692991800269.png

     

     

  • Noah100 Profile Picture
    on at

    @trice602 

    Is there no way to create HH:mm:ss out of the second half of the number? Then, in one compose action just take the outputs of both the date and HH:mm:ss actions and place them next to each other. Then the outputs of that one compose action can be used as Date Time

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard