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 with date format...
Power Automate
Answered

Error with date format and empty items.

(1) ShareShare
ReportReport
Posted on by 566
I have Imported an Excel Table on my flow which contains in a date column some dates and some empty cells.
I need to add these values to a sharepoint list but i get this message error:
 
The 'inputs.parameters' of workflow operation 'Créer_un_élément' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'Date' is required to be of type 'String/date'. The runtime value '""' to be converted doesn't have the expected format 'String/date'.
 
I supposed that the date format is not correct.
 
I tried this function below:
 
if(equals(item()?['Date'],''),null,formatdatetime(item()?['Date'], 'MM/dd/yyyy')))
 
But still cannot save these dates to my sharepoint list.
 
Any suggestions?
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    Use Coalesce to substitute an appropriate value when the value is blank.
     
    Coalesce(item()?['Date'],'1899-12-30')
     

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at
    Hello @Sormick,
     
    based on the error message it doesn't return an empty date, it returns "" instead (the value between the two apostrophes). I'm not sure what exactly is in your cells but that's the value I'd use in the condition:
    if(equals(item()?['Date'],'""'),null,formatdatetime(item()?['Date'], 'MM/dd/yyyy')))
     
    Additionally to that, I think that in general it's better to use the empty(...) expression to check empty values instead of equals(...) as it covers all the possible empty values - '', null, etc.
    if(empty(item()?['Date']),formatdatetime(item()?['Date'], 'MM/dd/yyyy'))
     
    ----------------------------------------------------------------------------------
    Did the answer solve your problem? Please click "Does this answer your question" to help others find the solution too!
     
    You can find more of my solutions on my blog https://tomriha.com
     
  • Verified answer
    Sormick Profile Picture
    566 on at
    Dear @Pstork1 and @tom_riha,
     
    Thank you so much for your reply.
     
    Finally i managed to skip empty values and send date values to my sharepoint list with:
     
    if(
      empty(item()?['Date'])
      ,null
      ,item()?['Date']
    )
     
    Many thanks for your support as always!

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