Hi all,
I am currently trying to filter a data table by a date range which is manually chosen by the user of the app. They have two date pickers, one is the start of the date range and the second is the end of the date range. I cannot get the second date picker (the one that selects the end of the date range) to work. I think there might be something wrong with the format of the date/time of the date picker but I cannot work out what it is.
The data table is filtered like this:
Filter(
FinanceTimeLog,
(
(IsBlank(NamePicker_1.Selected.UserPrincipalName) || AgentID = NamePicker_1.Selected.UserPrincipalName)
&&
(IsBlank(TeamPicker_1.Selected.Result) || Title = TeamPicker_1.Selected.Result)
&&
(CategoryPicker_1.Selected.Result = "All" || ok6e = CategoryPicker_1.Selected.Result)
&&
StartTime >= DatePicker2.SelectedDate
&&
StartTime <= DatePicker2_1.SelectedDate
))
You can see from the screenshots that when I change the second date picker to the date of the ticket that was logged, the item does not show in the table. Even though the filter is for: StartTime <= DatePicker2_1.SelectedDate.
This part of the formula: StartTime >= DatePicker2.SelectedDate works perfectly.
Above the date of the ticket is 26/04/2021 and both the date filters work perfectly. However, if I change the End Date datepicker (datepicker2_1) to 26/04/2021, the item does not show up:
Any help would be much appreciated.
Thanks,
Freddie
Solved! Go to Solution.
Hi @Anonymous
I think the problem is that the target record that you want to display has a date of '26/04/2021 08:55' (notice the time component).
Most likely, your end date criteria has a time component of 00:00, which would explain why you don't see your expected record in the result.
If you want to show all records that were created on the 26/04/2021 up to 23:59, an easy option would be to modify your logic to test for an end date of < 27/04/2021.
&& StartTime < DateAdd(DatePicker2_1.SelectedDate,1)
You may need to add the 1 day in a With block or variable if your formula shows a delegation warning with this technique.
Hi @Anonymous
I think the problem is that the target record that you want to display has a date of '26/04/2021 08:55' (notice the time component).
Most likely, your end date criteria has a time component of 00:00, which would explain why you don't see your expected record in the result.
If you want to show all records that were created on the 26/04/2021 up to 23:59, an easy option would be to modify your logic to test for an end date of < 27/04/2021.
&& StartTime < DateAdd(DatePicker2_1.SelectedDate,1)
You may need to add the 1 day in a With block or variable if your formula shows a delegation warning with this technique.
That works. Thanks a lot 🙂
User | Count |
---|---|
126 | |
87 | |
84 | |
75 | |
69 |
User | Count |
---|---|
214 | |
179 | |
139 | |
105 | |
83 |