我想为mysql查询中传递的任何给定日期生成下面的列表。
示例:给定日期为“2018-08-28”
我需要输出为
between '2018-08-28 00:00:00' and '2018-08-28 00:29:59'
between '2018-08-28 00:30:00' and '2018-08-28 00:59:59'
between '2018-08-28 1:00:00' and '2018-08-28 1:29:59'
between '2018-08-28 1:30:00' and '2018-08-28 1:59:59'
-
-
-
-
between '2018-08-28 23:00:00' and '2018-08-28 23:29:59'
between '2018-08-28 23:30:00' and '2018-08-28 23:59:59'
1条答案
按热度按时间ktecyv1j1#
试试这个,如果你发现任何问题就回复我。