cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rms359
Level: Powered On

Date Range Search

How can I create a date range search in looking into a table stored in One Drive?

3 REPLIES 3
Community Support Team
Community Support Team

Re: Date Range Search

Hi @rms359,

 

If you mean to filter Excel table stored in OneDrive, then we could take use of the Filter() function.

To get started, please first take a look at the following article:

Generate an App from Excel Data

 

Assuming the table under Excel is named as Table1, and there is a date column named with Date1, then the formula under the items property of a gallery to filter the table with date range should be as below:

Filter(Table1, 
DateTimeValue(Date1)>=DateTimeValue("2017/1/1"),
DateTimeValue(Date1)<=DateTimeValue("2017/12/1")
)

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Naireb
Level: Powered On

Re: Date Range Search

I actually thought of a filter that will search through a SQL server column without the blue squiggly underline. 

Filter(<your database>,
castDate >= DateDiff(Date(1900,1,1),DateStart_Select.SelectedDate), castDate <= DateDiff(Date(1900,1,1),DateEnd_Select.SelectedDate)
)

 

castDate was created in the SQL view to create a number value from the "beginning of time" or when we started counting it from, 1/1/1900. 3/22/2018 in numeric form would be 43179.


The select statement used to create 'castDate' was this:

CAST(dbo.Shipped_Date AS numeric) AS castDate


This way you can then filter based on a number value and not a DateValue(Text(<insert date>)) which ended up with a Suggestion that said part of this filter may not work due to service limitations.

I feel the same idea can be applied to this scenario. 

dhawalseth
Level: Powered On

Re: Date Range Search

If you are just looking for the code to generate date range.. follow here.

Date range search and collect

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 209 members 4,605 guests
Please welcome our newest community members: