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 Apps / Comparing dates using ...
Power Apps
Answered

Comparing dates using Lookup function / String was not recognized as a valid DateTime.

(0) ShareShare
ReportReport
Posted on by 379

I want to compare dates, I have a date that is entered in  a form in my canvas application against dates that are listed in a sharepoint list named OREHolidays.

 

I have put the following formula in a text label to test this out 

If(IsBlank(LookUp(OREHolidays,DateHoliday=DateValue(DataCardValueDateOT.SelectedDate),DateHoliday)),
"No Holiday" ,"Holiday"));

 

But I am getting the error below:

Lorem1960_0-1647959984185.png

 

Anyone has any idea what I am doing wrong here? Thanks

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Lorem1960 

    Please consider changing your Formula to the following:

    If(!LookUp(OREHolidays, DateHoliday = DataCardValueDateOT.SelectedDate, true), "No ") & "Holiday" 

     

    I hope this is helpful for you.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard