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 date time form...
Power Automate
Suggested Answer

Convert date time format in a create csv table error.

(0) ShareShare
ReportReport
Posted on by 70
Hi All,

I am trying to reformat the date and time value in a flow that reorganises a CSV file,


I have tried: 
formatDateTime(split(item(),';')?[2], 'MM/dd/yyyy hh:mm:ss')
Which gave me the above error.

This is how my create CSV table looks (Reorganises the CSV) 

The date and time comes in like this 2024-12-08T21:59:57+00:00
 
I would just need to format it in a different way, there isn't a way I can currently change the way the date format comes in so there must be a way to format the date and time differently using PowerAutomate?

Thanks.
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    The error message you are getting doesn't make sense on the value you say is being returned. The error says that the value is null, so you should not be getting anything back. I would put this portion of your expression split(item(),';')?[2] into a compose action to see what is returned. Then add the result to this post as it will help in resolving your issue. Otherwise, your expression should work as long as the split is returning the correct value:
     
  • Watkins Profile Picture
    70 on at
     


    This is the result I got from using just split(item(),';')?[2] which when looking at the input data looks correct. And I had already tried this in the flow and it does what is expected. The system we then upload this file to doesn't like the current date format which is the reason why I'd need to reformat it.
     
    Loggerserial;Meterserial;Datetime;NA;NA;NA;Type;NA;NA;NA;reading;Power;Flow-temp;Return-temp
    
    ;;;10;10;10;;10;10;10;;;;
    0016012932;2210165;2024-12-08T20:59:57+00:00;10;10;10;heat;10;10;10;3556000;-100;49,900;33,100
    0016012932;2210165;2024-12-08T21:59:57+00:00;10;10;10;heat;10;10;10;3557000;0;53,800;36,400
    
    ;;;10;10;10;;10;10;10;;;;
    
    

    Above is also how the input data looks before it goes into the flow copied from notepad, it is a CSV table. You can see that the date/time is definitely in the "2" position. The lines of 10's get removed and so does the header. 

    So I'm still not sure why PowerAutomate is not able to reformat this date. It could just be due to the way the file is or because I am removing the header and lines of 10's which are unnecessary. But it doesn't add or remove anything to the date. 


    Thanks for the help.

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard