cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Littlecatt
Regular Visitor

How to Search - Filter DatepickerFrom and DatepickerTo (getting a String)

Filter(
Travel,
(TravelDate >= DatePicker1.SelectedDate) && (TravelDate <= DatePicker1_1.SelectedDate)
)
_____________________________________________________________________________________________________
TravelDate = String
From Code above Show the Error  of  TravelDate = Invalid argument type. Expecting a Number value.
I have a data table that reads data from a sharepoint data source and the list is called "Travel", The column that i'm wanting to filter by is called "Travel Date". I am wanting to be able to Search Travel Date by Select Datepicker one called "DatePickerFrom" and the other called "DatePickerTo". I would then like the data in the table to just show any items as On selected date (DatePickerTo , DatePickerFrom).

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @Littlecatt you will have to convert the string to a date for e.g. Date(2021,2,18) 

base on your date format in the table you can use a combination of text functions to strip the year, month and day from it. for e.g. "01/01/2021", Year will be Right("01/01/2021",4), Month will be Mid("01/01/2021",1,2) and Day will be Mid("01/01/2021",4,2)

 

hope this helps

ps why not keep the date field as date in SharePoint? 

 

View solution in original post

2 REPLIES 2
rubin_boer
Super User
Super User

hi @Littlecatt you will have to convert the string to a date for e.g. Date(2021,2,18) 

base on your date format in the table you can use a combination of text functions to strip the year, month and day from it. for e.g. "01/01/2021", Year will be Right("01/01/2021",4), Month will be Mid("01/01/2021",1,2) and Day will be Mid("01/01/2021",4,2)

 

hope this helps

ps why not keep the date field as date in SharePoint? 

 

View solution in original post

Thank you 

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (29,605)