For reference:
_dateSelected is Type of Text and hold "1/18/2021 12:00 AM"
MyCalendarEvents hold Events for the entire current day.
originally, I had Gallery Items set to:
SortByColumns(MyCalendarEvents, "Start")
And this displays the events of the day correctly
Then I tried
SortByColumns(Filter(MyCalendarEvents, End < DateTimeValue(Text(_dateSelected, DateTimeFormat.ShortDate) & " 12:00 PM"), DateTimeFormat.ShortTime), "Start")
and then
SortByColumns(Filter(MyCalendarEvents, DateDiff(End, DateTimeValue(Text(_dateSelected, DateTimeFormat.ShortDate) & " 12:00 PM")) < 0, DateTimeFormat.ShortTime), "Start")
and it does not display any records. Thanks for considering
Solved! Go to Solution.
Hi @cycle4passion ,
Following your formula, I tend to think that you want to filter the sessions that end until 12:00 PM on current day.
So if my supposition is correct, your formula needs a small corection as End value from MyCalendarEvents collection is a dateTimeValue, like this:
SortByColumns(Filter(MyCalendarEvents, End < DateTimeValue(Text(_dateSelected, DateTimeFormat.ShortDate) & " 12:00 PM")), "Start")
Actually, I'm quite sure that:
DateTimeValue(Text(_dateSelected, DateTimeFormat.ShortDate) & " 12:00 PM"), DateTimeFormat.ShortTime)
does not retrive a value. You can put this formula inside a text property of a label control to see the real value (i think that you get a empty string).
Hope it helps !
...
HI @cycle4passion ,
Assuming your _dateselected is Text, it would be something like this
SortByColumns(
Filter(
MyCalendarEvents,
End <
DateAdd(
DateValue(_dateSelected),
1,
Days
) &&
Start >
DateValue(_dateSelected)
)
)
If it actually a Date value, this might do it
SortByColumns(
Filter(
MyCalendarEvents,
End <
DateAdd(
_dateSelected,
1,
Days
) &&
Start >
_dateSelected
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @cycle4passion ,
Following your formula, I tend to think that you want to filter the sessions that end until 12:00 PM on current day.
So if my supposition is correct, your formula needs a small corection as End value from MyCalendarEvents collection is a dateTimeValue, like this:
SortByColumns(Filter(MyCalendarEvents, End < DateTimeValue(Text(_dateSelected, DateTimeFormat.ShortDate) & " 12:00 PM")), "Start")
Actually, I'm quite sure that:
DateTimeValue(Text(_dateSelected, DateTimeFormat.ShortDate) & " 12:00 PM"), DateTimeFormat.ShortTime)
does not retrive a value. You can put this formula inside a text property of a label control to see the real value (i think that you get a empty string).
Hope it helps !
User | Count |
---|---|
184 | |
123 | |
90 | |
45 | |
42 |
User | Count |
---|---|
267 | |
160 | |
128 | |
81 | |
75 |