cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
freedumz
Level: Powered On

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
freedumz
Level: Powered On

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
leyburn19
Level 10

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;....; ....)

freedumz
Level: Powered On

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 ;

Sofie_D
Level 8

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;...)

freedumz
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,675)