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 / Error datetime string ...
Power Automate
Unanswered

Error datetime string in ISO 8601 format

(0) ShareShare
ReportReport
Posted on by 11

Hello,

 

I am creating a csv file from an excel file and am having trouble keeping the US DateTime format ('start': '11/26/2020 11:13:05 AM') from my original format.

PowerAutomate_Flow_1.png

My flow is as following and as from the first "List rows present in a table" this date is transformed into a string

"start":"44161.4674189815"

that I cannot change back to the original format (MM-dd-yyyyTHH:MM).

 

I've tried to format the date in the Select action using this function

 

formatDateTime(item()?['start'],'g')

formatDateTime(item()?['start'],'MM-dd-yyyyTHH:MM')

 

and some other options but I keep getting the error "failed: 'In function 'formatDateTime', the value provided for date time string '44161.4674189815' was not valid. The datetime string must match ISO 8601 format.'.".

 

Can you please advise?

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    Hi @sandracosta ,

     

    Try using the expression below to convert excel date:

     

    addDays('1899-12-30',int(item()?['start']),'MM-dd-yyyy')

     

    Thanks

  • sandracosta Profile Picture
    11 on at

    Hello @Anonymous

     

    Thanks for fast response but I've also tried that function (addDays('1899-12-30',int(item()?['start']),'MM-dd-yyyy') but get this error instead.

    InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '1' and column '2871': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    Besides I need the datetime format to remain "MM-dd-yyyy hh:mm".

  • Community Power Platform Member Profile Picture
    on at

    Hi @sandracosta ,

     

    Try using this expression

    addDays('1899-12-30',int(outputs('Get_a_row')?['body/start']),'MM-dd-yyyyTHH:MM'
     
    Image 5.pngImage 6.png

  • Community Power Platform Member Profile Picture
    on at

    I recommend selecting field from dynamic content. In your case it might put your compose in Apply to each loop.

     

    addDays('1899-12-30',int(*******),'MM-dd-yyyyTHH:MM'
  • sandracosta Profile Picture
    11 on at

    Hello @Anonymous,

     

    This seamed like a good solution, but when trying this I can't get any data from Get a Row.

     I have setup as this, I get a 400 error message:

    Captura de ecrã 2021-01-07 193900.png

     

    Call_SID is a key column in my file.

     

    Captura de ecrã 2021-01-07 194435.png

     

    Can you advise on this? Could this have anything to do with the file itself?

     

    Thanks in advance

  • Community Power Platform Member Profile Picture
    on at

    Can you try putting values manually in "Get a row" action and see if that works?

  • Community Power Platform Member Profile Picture
    on at

    Also can you post the error log & excel file(change it to dummy values) Just want to see the structure.

  • sandracosta Profile Picture
    11 on at

    Hello @Anonymous 

     

    Direct Get a Row with a single value in Call_SID, it fetches the row. Although the 'start' value, straight from the file already comes as a string or a float number (I can't determine), so the 'int' function does not work.

    Captura de ecrã 2021-01-08 101732_comErroInt.png

     

    The error log is this:

    Action 'DateFormat' failed
    Unable to process template language expressions in action 'DateFormat' inputs at line '1' and column '2871': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    But with dynamic content (items / values) the action comes out emply. It's the same error as above.

     

    Captura de ecrã 2021-01-08 101355_comErro.png

     

    The error log is this

    {
     "status": 404,
     "message": "No row was found with Id '{\"@odata.id\":\"/drives('b%21-8CU6OTQhkOYvKAjuF_Gp8lZA1_en2FKrlFVv3lHgCFTWkqv8307RpiXRrVJxHYC')/items('01EJH6R5TGAE3BQKFEDJC222VSE76XKVVK')/workbook/tables(%27%7B00000000-000C-0000-FFFF-FFFF00000000%7D%27)\",\"style\":\"TableStyleMedium6\",\"name\":\"Table_ExternalData_2\",\"showFilterButton\":true,\"id\":\"{00000000-000C-0000-FFFF-FFFF00000000}\",\"highlightLastColumn\":false,\"highlightFirstColumn\":false,\"legacyId\":\"2\",\"showBandedColumns\":false,\"showBandedRows\":true,\"showHeaders\":true,\"showTotals\":false}'.\r\nclientRequestId: 86db9511-92f0-4dc6-a568-cb86638e7ba4\r\nserviceRequestId: 5d11c4a4-0dc2-4b3e-a87a-6c1333517654;b079114c-7d78-41e3-a131-da4c4c7f6e54",
     "error": {
     "message": "No row was found with Id '{\"@odata.id\":\"/drives('b%21-8CU6OTQhkOYvKAjuF_Gp8lZA1_en2FKrlFVv3lHgCFTWkqv8307RpiXRrVJxHYC')/items('01EJH6R5TGAE3BQKFEDJC222VSE76XKVVK')/workbook/tables(%27%7B00000000-000C-0000-FFFF-FFFF00000000%7D%27)\",\"style\":\"TableStyleMedium6\",\"name\":\"Table_ExternalData_2\",\"showFilterButton\":true,\"id\":\"{00000000-000C-0000-FFFF-FFFF00000000}\",\"highlightLastColumn\":false,\"highlightFirstColumn\":false,\"legacyId\":\"2\",\"showBandedColumns\":false,\"showBandedRows\":true,\"showHeaders\":true,\"showTotals\":false}'."
     },
     "source": "excelonline-ne.azconn-ne.p.azurewebsites.net"
    }

     

    The files structure is this

    Call_SIDInteraction_IDRECORD IDstartRecommendation_ScalelevelOfSatisfactionOfCallResolution_Scale
    CAb2b17ed5c0041f6c349968aa3e25c68001f8e0f817ed448aaeb31e4eee959d1f01f8e0f817ed448aaeb31e4eee959d1f1/6/2021 12:53:57 PM1041
    CAcdc73ff39b974960be497d6feea3081e020ad47cb2234e2ea87938fd41ab47c8020ad47cb2234e2ea87938fd41ab47c81/6/2021 1:50:29 PM012
    CA10c48146b5a228d9de1cf9d0e6c1abdb056366ddd7ad4879940686e3b4a9b978056366ddd7ad4879940686e3b4a9b9781/6/2021 12:18:13 PM  3
    CA03eff9f465d9497e37fda88957b96a5d
    08693ea713334499b685e75aae435fc908693ea713334499b685e75aae435fc91/6/2021 11:44:31 AM631

     

    Thanks in advance

     

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