Hello,
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 an example of c_time time stamp:
2018-04-17 16:58:25
I want to filter results by time.
Onec according to dates e.g. between April 1th 2017 and September 4th 2019 or from March 5th onards
I tried
SELECT ticket, o_time, type, size, item, o_price, s_l, t_p, c_time, c_price, profit FROM data WHERE DATE_FORMAT(c_time, '%Y-%m-%D') >= '2018-03-05'
ORDER BY c_time
The WHERE DATE_FORMAT(c_time, ‘%Y-%m-%D’) >= ‘2018-01-01’ was ignores. I got results as if this dae filtering condition doesn’t exist
I also tried filterin results by day of week adding
WHERE DATE_FORMAT(c_time, '%w') = 4
nothing happened. I got results as if the where condition doesn’t exist
What do I do wrong?