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 / [Bug Report] Date Comp...
Power Apps
Answered

[Bug Report] Date Compare > Equal or Less Equal a date doesn't work in Collect Filter

(0) ShareShare
ReportReport
Posted on by 76

1. Normal Date compare is OK, for example:

DateValue("2024/04/01") <= DateValue("2024/04/01")

 

2. One dataverse table(CheckWorks) with date column(CheckWorks_Date), for example:

CheckWorks>CheckWorks_Date, DateType = DateTime & Date Only, cantains 2 Values as following:

2024/4/1,2024/4/2

 

3. I want to grep: 2024/04/01, so I Filter it.

ClearCollect(
  _test1,
    Filter(
         CheckWorks,
             CheckWorks_Date <= DateValue("2024/04/01") // ★★★NG, u can't grep 2024/04/01

             CheckWorks_Date < DateValue("2024/04/02") // ★★★OK, now u can grep 2024/04/01

   )
)

 

Categories:
I have the same question (0)
  • Verified answer
    EddieE Profile Picture
    4,641 Moderator on at

    @fgu3029 

    My guess would be that the issue is related to the Time portion of your Date Values. You'd need to double check that.

     

    You could try using the TimeValue function to check each side of the filter equation. You could also try wrapping your field in DateValue, eg

    DateValue(CheckWorks_Date) <= DateValue("2024/04/01")

     

    However, this may cause a Delegation error - not sure as I don't use DataVerse

  • fgu3029 Profile Picture
    76 on at

    Thank u for reply. Tried, Add DateValue in left side of eaqul operator doesn't work. 

    Hope ms can see this bug report.

  • EddieE Profile Picture
    4,641 Moderator on at

    @fgu3029 

    Did you test Time for each side? eg

    TimeValue( First(CheckWorks).CheckWorks_Date )
    
    // versus
    
    TimeValue( DateValue("2024/04/01") )

     

    I suspect these are different??

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard