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 / The execution of templ...
Power Automate
Unanswered

The execution of template action 'Create_HTML_table' failed. The column values could not be evaluated: 'In function 'formatDateTime', the value provided for date time string '45078' was not valid. The datetime string must match ISO 8601 format.'.

(0) ShareShare
ReportReport
Posted on by 10

Hi, I am getting this error message:

The execution of template action 'Create_HTML_table' failed. The column values could not be evaluated: 'In function 'formatDateTime', the value provided for date time string '45078' was not valid. The datetime string must match ISO 8601 format.'.  Here is the error in the flow:

Lindsay2_0-1686049615837.png

And my flow is: 

Lindsay2_1-1686049648814.png

Lindsay2_2-1686049666136.png

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @Lindsay2 ,

     

    Base on the number that you are trying to convert to a date format, I'm assuming that you are pulling it from Excel: let me know if it is not the case. As you can see, Excel dates are actually just integer numbers, and for Power Automate we need it in another format. To convert it from Excel to Power Automate, you need to use this expression: addDays('1899-12-30', int(item()?['date']), 'dd-MM-yyyy'), replacing the red text for the value of your date source. You can use this expression inside your 'formatDateTime'.

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

     

  • Lindsay2 Profile Picture
    10 on at

    Cheers Rzaneti! This has helped! Much appreciated. 

  • DAVITz Profile Picture
    12 on at

     

    Apologies for any inconvenience. I'm dealing with a similar issue regarding the format while trying to upload data from Excel to SharePoint. I've consistently encountered errors related to the date format. Could you please provide assistance with this?

    DAVITz_0-1706724148236.png

     

  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @DAVITz ,

     

    You are not being inconvenient at all!! We are here to help 🙂

     

    I'm assuming that you are trying to return values from Excel as ISO date format (which is used by Power Automate for any other actions), and not as Serial; is this correct? If yes, in your "Enumerar las filas de una tabla" action, change the "Datetime" format option to ISO 8601 (highlighted in yellow):

    rzaneti_0-1706751280460.png

     

    If this is not the case, please provide me with some additional details about what is your expected output from Excel and how do you want to use it in SharePoint. 

     

    Also, for future reference from you or other community members finding the same issue, I'm sharing a blog post with more detailed instructions about how to get dates form Excel in Power Automate: http://digitalmill.net/2023/08/18/formatting-dates-from-excel-in-power-automate/ 

     

    Let me know if it works for you or if you need any additional help!!

     

  • DAVITz Profile Picture
    12 on at

    I need to load data from Power Apps that comes from an attached Excel spreadsheet to a SharePoint list. However, I'm facing an error despite having the data formatted in ISO 8601. It would be great if you could help me; I've been dealing with this for two days already.

    DAVITz_0-1706752154120.pngDAVITz_1-1706752185047.pngDAVITz_2-1706752272876.png

     

  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @DAVITz ,

     

    Could you please share the raw inputs from your "Create item" action? To find the raw inputs, you just need to go to any flow run that failed in this specific action and click in "Show raw inputs"

    rzaneti_0-1706791806773.png

     

    After that, a new pane will show up in the right side of the screen with a JSON notation. We need the value related to your date column, which can be found inside the "parameters" block: 

    rzaneti_1-1706791840639.png

     

    Before sharing an image of the outputs, make sure to remove any sensitive data 🙂

  • DAVITz Profile Picture
    12 on at

    I went to raw entries, and it shows as if they were numbers, but they are actually dates

    DAVITz_0-1706808758309.png

     

  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @DAVITz ,

     

    One of the fields is populated with a date/time (field_9), and field_1 (which I'm assuming that is equivalent to "fecha" Excel column) seems to have a Serial date. I've just tested in Excel, and the serial date from field_1 (38718) is equivalent to 2006-01-01 (same of field_9). Is this the expected date for field_1? Also, just to confirm: is there any other of these fields expected to be a date? If yes, which one?

     

    I also ran some tests in Power Automate to convert it from Serial to ISO date. First, I assigned the 38718 to a "Compose" action (you don't need to do it from your end, as you already have this value extracted from Excel):

    rzaneti_0-1706828730191.png

    Then, in the "Create item" action, I included an expression very similar to the proposed in this topic solution:

    rzaneti_1-1706828796702.png

     

    Expression: addDays('1899-12-30'outputs('Compose')'dd-MM-yyyy'). Make sure to replace the red text for the dynamic content of "fecha".

     

    After running the flow, this is the output:

    rzaneti_2-1706828909596.png

     

     

    Let me know if it works!!

  • DAVITz Profile Picture
    12 on at

    I appreciate you for continuing to respond. My conflict is that I need the date with the time. I tried your method, and it didn't work for me. I'll share the error; hopefully, you can help.  

    DAVITz_0-1706832105877.png

     

  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @DAVITz ,

     

    To capture the date with the time (instead of only the date), you can remove the formatting parameter from the expression, so it will look like this: addDays('1899-12-30'outputs('Compose')).

     

    This last error seems to be more related to the expression structure rather than the input data types. Can you share the expression that you used in the input?

     

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard