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 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,299 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

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard