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 / Date/Time value that i...
Power Automate
Answered

Date/Time value that is empty is not being detected by the expression empty()

(0) ShareShare
ReportReport
Posted on by 1

Date/Time value that is empty is not being detected by the expression empty().

 

I am trying to update and append a table from Excel to a SharePoint list using Power Automate. During this process, I am receiving an error: Input parameter is required to be of type 'String/date.' The runtime value " " to be converted does not have the expected format 'String/date.'

nboynton_0-1657286461719.png

 

Therefore, I have tried to solve this issue in a variety of ways, however none seem to be working. 

  1. Replacing empty dates with null.
    1. if( empty(items('Apply_to_each')?['Pick-Up Date']), null, items('Apply_to_each')?['Pick-Up Date']) - Did not work. 
    2. if( equals(items('Apply_to_each')?['Pick-Up Date'], ''), null, items('Apply_to_each')?['Pick-Up Date']) - Did not work.
    3. if( equals(items('Apply_to_each')?['Pick-Up Date'], ' '), null, items('Apply_to_each')?['Pick-Up Date']) - Did not work.
  2. I have tried to troubleshoot the empty() and equals() expressions by trying to see if these come out as true in a compose action. 
  3. nboynton_2-1657287018004.png
  4. I keep getting that the outcome is false. The outcome is false even when the input is empty. 
  5. nboynton_3-1657287704214.png
  6. nboynton_5-1657287816043.png

     

Am I somehow configuring the empty() expression wrong? 

 

Thank you all for your help with this!

Categories:
I have the same question (0)
  • Verified answer
    v-yujincui-msft Profile Picture
    on at

    Hi @nboynton ,

     

    Maybe you could try the following expression:

    if(empty(trim(items('Apply_to_each')?['Pick-Up Date'])),null,items('Apply_to_each')?['Pick-Up Date'])

    or

    if(empty(replace(items('Apply_to_each')?['Pick-Up Date'],' ','')),null,items('Apply_to_each')?['Pick-Up Date'])

     

     

    Best Regards,
    Charlie Choi

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