cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rho1967
Helper III
Helper III

Filter between date

Hi everyone,

I would like to create a collection filtered between today's date -10 days and today +10 days. I thought of the following. Unfortunately, the collection remains empty.

ClearCollect(col_keukenvwRecipeCombi,
Filter('kitchen.vwRecipeCombi',(Date=DateAdd(Today(),-10,Days)) && (Date=DateAdd(Today(),10,Days)),CombiActive=true))

Regards,
Raymond

2 ACCEPTED SOLUTIONS

Accepted Solutions
yhan
New Member

ClearCollect(col_keukenvwRecipeCombi,
Filter('kitchen.vwRecipeCombi',(Date>=DateAdd(Today(),-10,Days)) && (Date<=DateAdd(Today(),10,Days)),CombiActive=true))

View solution in original post

Drrickryp
Super User
Super User

@rho1967 

With({startdate:Today()-10,
      enddate:Today()+10
     },
  ClearCollect(
               col_keukenvwRecipeCombi, Filter(
                                             'kitchen.vwRecipeCombi',
                                              Date>=startdate && 
                                              Date<=enddate && 
                                              CombiActive
                                        )
  )
)

View solution in original post

2 REPLIES 2
yhan
New Member

ClearCollect(col_keukenvwRecipeCombi,
Filter('kitchen.vwRecipeCombi',(Date>=DateAdd(Today(),-10,Days)) && (Date<=DateAdd(Today(),10,Days)),CombiActive=true))

Drrickryp
Super User
Super User

@rho1967 

With({startdate:Today()-10,
      enddate:Today()+10
     },
  ClearCollect(
               col_keukenvwRecipeCombi, Filter(
                                             'kitchen.vwRecipeCombi',
                                              Date>=startdate && 
                                              Date<=enddate && 
                                              CombiActive
                                        )
  )
)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,543)