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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (57,826)