web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter collection by t...
Power Apps
Answered

Filter collection by time when having time as text column in sharepoint list

(0) ShareShare
ReportReport
Posted on by

Hello all,

 

I am using a Gallery in my app which source is a collection from a sharepoint list. This is working and I get all values in my Gallery. Now I want to have only values which are now or in the future. I have a column in my sharepoint list with the name "End". This column is a text column and contains for example "10:00". 

 

 

ClearCollect(bzqa; Filter('Teams Room BZQA'; Now() >= End ))

 

 

This does not work because End is not a type of time. Do I have to split "End" to minutes and seconds, or is there an easy way to check if the End value is in the past?

 

BR

Kay

Categories:
I have the same question (0)
  • Kayle Profile Picture
    on at

    Thanks everyone for your help. The solution from @mmollet is working.

     

    BR

    Kay

  • Verified answer
    mmollet Profile Picture
    3,187 on at

    I would say the easiest way to do this with a text column would be to store the times as "numbers" in your text field. For example if you saved 10:00 as 1000 then its more useful as the ':' in between the numbers forces you to use it as a string or split it etc. 

     

    Once you have the times saving without the ':' then for the example you mentioned you just do:

    ClearCollect(bzqa; Filter('Teams Room BZQA'; Value(Concatenate(Hour(Now()), Minute(Now()))) >= Value(End)))

     

    This will convert the current time (8:50:24) to the number 850 then compare it to the number representation of End

  • ShantanuP Profile Picture
    on at

    Is End text represents 24 hour clock? If yes then you can do something like following:

     

    ClearCollect(bzqa; Filter('Teams Room BZQA'; Hour(Now()) >= Hour(TimeValue(End)) ))
  • Pstork1 Profile Picture
    68,863 Most Valuable Professional on at

    Try adding either a TimeValue() or DateTimeValue() function around the End column in the formula. I suspect you'll need to use the DateTimeValue() function and add a static date to the time using concatenation before converting.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 365 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard