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 / convert date time to s...
Power Automate
Answered

convert date time to string

(1) ShareShare
ReportReport
Posted on by 381
I need to convert a date time format in excel to a string so that I can pass this through to Smartsheet
 
However, I can't make out the syntax in this AI description
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,974 Moderator on at
     
    Are you getting errors?
    Have you made sure that the actions it creates are using ISO 8601 formats for any excel reading actions? (meaning that its turn on in the action when reading data from excel)
     
    You said you cannot get a string, but we need to see the actual agent, the action its trying to do, the input/output and preferably including errors etc.
  • PeggyLang Profile Picture
    381 on at
    @Michael E. Gernaey

    I need help writing that piece of my flow.  Below is as far as I was able to get.

  • Ellis Karim Profile Picture
    12,024 Super User 2026 Season 1 on at
    Hi  PeggyLang,
     
    @Michael E. Gernaey is referring to the following setting for the DateTime Format in the List rows present in a table action:
     
     
    Ellis Karim
    Ellis Karim
    Blog | LinkedIn | Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
  • Yasemin Profile Picture
    59 on at
    Hi, try using 'yyyy-MM-ddTHH:mm:sszzz' as the format for Smartsheet requires ISO 8601 (Smartsheet documentation: Dates and times ) I assume this requires the target columns data type to be formatted to a date as well, maybe you can check that. 
     
    If you're trying to create a new row in Smartsheet for each row in the Excel file, add an action for creating a new row in Smartsheet inside the foreach loop, that iterates through the Excel column. 
     
    Use formatDateTime with the correct format that is required by Smartsheet either in the Compose action or use the formatDateTime() function directly in the Smartsheet new row action and the corresponding columns parameter field inside the apply to each loop.
     
    If you're trying to convert something to a string, you can use the function string() 
  • PeggyLang Profile Picture
    381 on at
    Hello Ellis,

    I have created a manual test and the flow runs successfully. 
    Screenshot below of the flow with your guidance.
     
     
    After I have run this flow I then invoke the Data Shuttle to write all the rows from the excel to my Smartsheet Worksheet. 
    I'm still only getting the date portion of the column.
    Screenshot below is the excel file on Sharepoint site.
     
     
    Screenshot below is the cell in my Smartsheet worksheet that is only receiving the date portion.
     
     
    I really need the cell highlighted in Smartsheet worksheet to read;
    2025-06-17 05:21:03
     
    I'm not sure what I'm missing here.
  • Ellis Karim Profile Picture
    12,024 Super User 2026 Season 1 on at
    Hi PeggyLang
     
    I found this:
     
    "Smartsheet currently doesn't allow timestamps except in the system Modified and Created columns. The only way to display the timestamp, as you have found, is as a text column. "
     
     
     
     
    Ellis Karim
    Ellis Karim
    Blog | LinkedIn | Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
  • PeggyLang Profile Picture
    381 on at
    Correct, but I'm trying to pass a 'text string' from excel to a column in my Smartsheet worksheet.
    I'm tring to convert the column in excel that contains the full date/time format to a text string, then write that to Smartsheet via Data Mesh.  Text to text.  That should work.  But i'm having trouble converting the date/time format in excel through power automate to a text string.
  • Verified answer
    PeggyLang Profile Picture
    381 on at
    While walking in the garden, the solution became so clear I can't believe I didn't see it earlier.
    I have added a script;
     - insert column next to column containing Date /Time
     - New column contains =TEXT formula to convert the Date /Time to a text string
     
     
     
     
    Runs perfectly now.
     
     
  • Ellis Karim Profile Picture
    12,024 Super User 2026 Season 1 on at
    Hi 
     
    When you use "List Rows present in a table" with the ISO 8601 setting, the date columns are read as text.
     
    Here is an extract of the runtime output of a "List Rows present in a table". Note the "Note Created Time" and "Note Created Date" are read as text:
     
     
     
    So, you should be able to send the date time like "2025-06-17 05:21:03" from Excel as is to a Text/Plain Text column in Smartsheet.

    What is the error message, or output you see in Smartsheet?
     
    Ellis Karim
    Ellis Karim
    Blog | LinkedIn | Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
     
  • PeggyLang Profile Picture
    381 on at
    @Ellis Karim
    That is curious 'the date columns are read as text'.  But when the data shuttle took the excel data and wrote it to my Smartsheet worksheet ONLY the date portion was written.
     
     
    AFTER adding the script to insert new column and use the =TEXT formula the output to my smartsheet via Data Shuttle was then the entire Date/Time format.
     
    Curious as well, what are screenshots from that you included in your response below?  It appears to be my data somehow.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard