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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Time range Filter base...
Power Apps
Unanswered

Time range Filter based on one column

(0) ShareShare
ReportReport
Posted on by 94

Hi, I had one column named Time Filter.

I want to get the time range from 6am to 6pm or any time that I want to filter

how can I filter it using dropdown ? give suggestion please.

Categories:
I have the same question (0)
  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @jayceeb 

     

    1. Add two dropdowns to save hours (from 0 to 23) 

    vliweimsft_0-1664271993460.pngvliweimsft_1-1664272005738.png

     

     

    2. Use the Text function to convert the date column of the data source to hours. 

    3. Use the Value function to convert the string returned by the Text function to a number. 

    4. Use the Filter function to filter.

    vliweimsft_2-1664272020602.pngvliweimsft_3-1664272047948.jpeg

    Filter('927Time',Value(Text(ThisRecord.Time,"h"))>=Dropdown1.Selected.Value&&Value(Text(ThisRecord.Time,"h"))<=Dropdown1_1.Selected.Value)

     

    Best Regards,

    Levi

  • jayceeb Profile Picture
    94 on at

     

     

    hi, Thank you. I tried but it shows this error.

    jayceeb_2-1664273687805.png

     

  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @jayceeb 

     

    Could you please provide a screenshot of how you are setting the dropdown's items property? 

    Make sure that the array you enter in the items property of the dropdown contains numeric data rather than strings.

     

    Best Regards,

    Levi

  • jayceeb Profile Picture
    94 on at

    hi thank you . I got no error however it shows blank I think my column is already in Text when I patch as text. how the data will appear

     

    jayceeb_0-1664337601862.png

     

  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @jayceeb 

     

    Can you show me how you designed your dropdown? 

    According to the test I showed you, if you want to display between 6am and 6pm, you should choose six in the first dropdown and 18 in the second dropdown.

     

    Best Regards,

    Levi

  • jayceeb Profile Picture
    94 on at

    the design is like this

     

    jayceeb_0-1664339850874.png

     

  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @jayceeb 

     

    Could you please tell me have your problem been solved?

     

    Best Regards,

    Levi

  • jayceeb Profile Picture
    94 on at

    my data source name is Breakages , the name of my column Date and Time.. format is like this Sunday, September 11, 2022 6:55:10 AM

    I use below codes however It shows blank. 😞

     

    Filter(Breakages,Value(Text(ThisRecord.'Date and Time',"h"))>=Dropdown1.Selected.Value&&Value(Text(ThisRecord.'Date and Time',"h"))<=Dropdown1_1.Selected.Value)

  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @jayceeb 

     

    This may be caused by the time difference issue, the time in powerapps shows the local time. 

    If your data source is SharePoint, the time column is in UTC time.

     

    Best Regards,

    Levi

  • jayceeb Profile Picture
    94 on at

    I'm using excel and link to onedrive.  not yet solve until now I'm figuring out. 😞

    jayceeb_0-1664350681162.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard