@BuiDucNghia ,
I have not addressed your If logic as it is not clear to me, but for the rest if you want to sort by Time on the date selected
If(
IsBlank(colSelectedDate), //if gallery not select, filter Gallery is Today
SortByColumns(
Filter(
AddColumns(
colLichTuan,
"TimeSort",
Text(ThoiGian,"hh:mm")
),
txtSearchLichTuan.Text in Text(ThoiGian,"dd/mm/yyyy) ||
Text(ThoiGian,"dd/mm/yyyy") = Text(Today(),"dd/mm/yyyy")
),
"TimeSort",
If(
varSortOrder,
Descending,
Ascending
)
),
WeekdayGallery_1.Selected.LichHop_grp
)
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.
Visit my blog Practical Power Apps