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 Automate
Answered

Format Date issue

(0) ShareShare
ReportReport
Posted on by 792

Hi All

 

I am in the middle of building a flow and i am trying to format the date columns within the create csv table so currently the dates are formatted as yyyy-MM-ddT00:00:00Z and i wish to change it to ISO 'u'. I thought that this would have been a simple formatdateTime(item()?['OData_x0032_hr_x002d_Due'],'u') however every item returned does not have a date therefore the flow fails.

Can anyone share the best work around for this situation?

 

Kmayes_0-1631187766362.png

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Kmayes,

     

    Can you try this expression instead?

     

    if(empty(items('Apply_to_each')?['OData_x0032_hr_x002d_Due']), 'No date', formatdatetime(items('Apply_to_each')?['OData_x0032_hr_x002d_Due'], 'u'))
  • Kmayes Profile Picture
    792 on at

    @Expiscornovus Unfortunately that didn't work either

     

    Kmayes_0-1631191917436.png

     

  • Verified answer
    Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Kmayes,

     

    Apologies, a bit too much copy pasting from my dev tenant 😁

     

    It should have been item() instead of items('Apply_to_each')

     

    if(empty(item()?['OData_x0032_hr_x002d_Due']), 'No date', formatdatetime(item()?['OData_x0032_hr_x002d_Due'], 'u'))

     

     

  • Kmayes Profile Picture
    792 on at

    @Expiscornovus No problem i thought i took the apply to each out tbh ha ha. Now the flow seems to run but what I have noticed is that it is applying 'No Date' to every item... should the create csv be wrapped within an apply to each to make it work independently?

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @Kmayes,

     

    No, that shouldn't be necessary. Also see my test below. 

     

    Maybe it is worth checking if the internal name of that column is correct, in the SharePoint list settings.

     

    example.png

  • Kmayes Profile Picture
    792 on at

    Thanks @Expiscornovus It looks like i miss typed an O or 0 🤣

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 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard