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 / Check a date in a colu...
Power Apps
Answered

Check a date in a column of sharepoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I'm trying to check if a date that i put in a Date picker matches with dates i have in a sharepoint list but i don't really now how to get to the point (it's my first use of powerapps).

remi86000_0-1624281622155.png

tried to do this but it seems very strange to me (must be a better way).

Thanks for your help.

 

Categories:
I have the same question (0)
  • ganeshsanap Profile Picture
    1,555 on at

    @Anonymous What exactly the problem is? 

    The formula you are using is not working or you need better/optimized version of existing working formula?


    Please click Accept as solution & ‌‌👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

     

    Best Regards,

    Ganesh Sanap

    Blog site 

  • ganeshsanap Profile Picture
    1,555 on at

    @Anonymous You can also write multiple conditions in one line using OR ( || ) operator like: 

     

    If(
     DebutEmpruntPicker.SelectedDate = reservationtest.DebutEmprunt ||
     DebutEmpruntPicker.SelectedDate = reservationtest.FinEmprunt ||
     FinEmpruntPicker.SelectedDate = reservationtest.DebutEmprunt ||
     FinEmpruntPicker.SelectedDate = reservationtest.FinEmprunt,
     "Reserved",
     "Free"
    )

     

    DocumentationAnd, Or, and Not functions in Power Apps 


    Please click Accept as solution & ‌‌👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

     

    Best Regards,

    Ganesh Sanap

    Blog site 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    For now the ting i realise isn't working, i was more looking for another solution (that works) than optimatisation but thanks anyway

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    For now the thing i realise isn't working, i was more looking for another solution (that works) than optimatisation but thanks anyway

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Have your solved your problem?

    Do you want to compare the DatePicker selected date with the existing date in your SP list?

    Could you please share a bit more about the scenario?

    From the screenshot you provided, I think you have a start date column and a end date column, also DatePickers for start date and end date. If so, I think you could compare the selected date with

    Please try the following formula

     

    If(
     ThisItem.startD <= DatePicker2.SelectedDate && DatePicker2.SelectedDate <= ThisItem.endD || 
     ThisItem.startD <= DatePicker3.SelectedDate && DatePicker3.SelectedDate <= ThisItem.endD,
     "reserved",
     "free"
    )

     

    Note that you could only compare the current selected date with the date from the current record.

    vqiaqimsft_0-1624853181213.png

    If this could not solve your problem, please post your solution that works on your side, so that our users could get help form here.

    Regards,

    Qi

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 915

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 457

Last 30 days Overall leaderboard