Using Date Pickers

Hello. I have an IoT application wherein I am using google sheet as database for it. I want to display in a list view that can be filtered using date pickers to display the range of data. Like, Date Start - 01 Sep 2024 to Date End - 30 Sep 2024. I could not find tutorials for this kind of functionality of date pickers. Can anyone help? TIA

You could possibly use a Custom Filterbar on your listview

Would need to see your listview elements (do they contain your dates?)
or
Do you have underlying data that contains the dates (not shown in the listview) in order to define the listview elements?



What im only missing is the usage of date pickers.

Did you define your DateTime column in your Sheet as numeric, to allow you to filter upstream in Sheets? Sheets dates are measured in days since December 31 1899.

Date Pickers only give you a date. It's up to you to format the dates in comparable formats like yyyyMMdd.

Formatting the dates of datepicker have tuturials. No problem there. How to use the block to filter the data as per date, I have no idea. The dates are auto generated to the real time as per sensor readings data is saved. Theres no problem displaying list of data from google sheet to the list view. My problem how can I choose display only the data i want to see by period of dates. Lets say from Sep 1 2024 to Sep 30 2024. Could be Sept 15 2024 to Oct 15 2024. Format excluded.

Is there a way to just use blocks? Because the long method is sending the datepicker values. Use appscript to filter the data by date range. Then transfer the filterd data to another sheet. Extract these csv list and display in the list view.

Look for ways to filter the sheet upstream.

Post a link to read the sheet, for specific advice.

See this example:

filterListviewByDates.aia (4.1 KB)

Thank you very much. I will try this.

Here is an update that sets the datepickers with the first and last dates in the list (assumes they are in order - if not sort the incoming data first)

filterListviewByDates_updated.aia (5.4 KB)

There is an error. So I have to resort to the long method.

Just to share, incase anyone needed reference on how to filter google sheet data by time or date period. Its just painstaking to make it work. But its great.









This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.