web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / cannot use the formatD...
Power Automate
Unanswered

cannot use the formatDateTime expression to display the date fields in sharepoint list

(0) ShareShare
ReportReport
Posted on by 12

Hello Team,

 

To start, I am not an expert with ms flow, but I am doing my best to learn...

I have an excel table( with a list of items) and I would like to use this excel to update some fields in my a sharepoint list. I created an ms flow and I can update the string fields without any issue. I have a problem just with Dates.. I have tried the FormatDateTime in different formats, but I still have an error message when I test the flow (see attached). I don't know in my case why I cannot use the normal expression : formatDateTime(items('Apply_to_each')?['Customer Payment Date'],'dd/MM/yyyy'...

 

I am struggeling with this for few days..I hope that someone can help me to solve it...

 

Thanks,

Sabrina

flow formatdate.pngerror.png,

Categories:
I have the same question (0)
  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at
    Re: cannot use the formatDateTime expression to display the date fields in sharepoint list

    @sabrinekalbouss 

    please use this expression-

    if(empty(outputs('Dynamic content column from excel')),null,addDays('1899-12-30',int(outputs('Dynamic content column from excel')),'yyyy-MM-dd')).

    Steps-

    1. Use compose action and input- date column from excel 

    2. Add this expression. 

    3. in your case - Dynamic content column from excel : Customer payment Date

     

    Note- Empty function is used to check if date column has value or not. if you do not need it use that with empty function.

     

    Thanks

    Hardesh

  • sabrinekalbouss Profile Picture
    12 on at
    Re: cannot use the formatDateTime expression to display the date fields in sharepoint list

    @Hardesh15 Thanks a lot for your reply. 

     

    I have tried to use your solution by adding a compose function first and then the expression in the update sharepoint item step ( see screenshot) and I got this time another error message.

     

    error2.pngERROR3.png

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at
    Re: cannot use the formatDateTime expression to display the date fields in sharepoint list

    @sabrinekalbouss 

     

    What is output of your compose? Can you share?

    Thanks

    Hardesh

  • sabrinekalbouss Profile Picture
    12 on at
    Re: cannot use the formatDateTime expression to display the date fields in sharepoint list

    @Hardesh15  It works now 🙂 thanks a lot for your 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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard