Here is my query:
"SELECT ticket, o_time, type, size, item, o_price, s_l, t_p, c_time, c_price, profit FROM data ORDER BY c_time"
Here is the time (o_time, c_time) :
I want to add an option to get results for various time periods
All – all results (this is the current query). This option will be the default option.
This year or any previous year in a pull down menu
A certain munth (this month is default)
Any time range (e.g. 2017-10-14 to 2019-8-17)
Certain day of week (e.g. all Mondays)
Specific hours (e.g. all resultswhere the time is between 11:00 to 14:00)
The only way I can think of is a div with options to select the desired period of time any a button which says “APPLY”
It will lead to a case statement that will execute a query, and I will need a separate function for each option.
Am I right?
Is there a shorter way?