cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

IF with a datePicker?

Hi everyone

I'm trying to do a If with a datePicker

So I have a data source called Source and in this data source I have some date

So I'd like to show some values only if my date are equals

So I use: If(Source.Date=DatePicker.SelectedDate;....; ....) but it's not working, it's returning Argument not valid, I tried other things but it didn't work

(yes my date field is in the date Format)

 

Many thanks in advance for your help

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Re: IF with a datePicker?

I finally found the solution:

 

If(Date=DatePicker.SelectedDate;...;...)

 

I don't have to put Source.Date,  so I know that I have to give better name to my list columns because If I use another source with a date column it would become tricky

 

But thanks for your help

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: IF with a datePicker?

Your IF should be seperated by a , not a ;

 

If(Source.Date=DatePicker.SelectedDate,...., ....)  not  If(Source.Date=DatePicker.SelectedDate;....; ....)

Highlighted
Helper II
Helper II

Re: IF with a datePicker?

No no

As my powerapps is in French, I have to use ";" and not ","

I know, it's weird but it's work with ;

Highlighted
Responsive Resident
Responsive Resident

Re: IF with a datePicker?

Try using DateDiff function https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-dateadd-datediff

If(DateDiff(Source.Date;DatePicker.SelectedDate)=0;...)

Highlighted
Helper II
Helper II

Re: IF with a datePicker?

I finally found the solution:

 

If(Date=DatePicker.SelectedDate;...;...)

 

I don't have to put Source.Date,  so I know that I have to give better name to my list columns because If I use another source with a date column it would become tricky

 

But thanks for your help

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,621)