for example, an event segment is given: 2018-09-21 17:51:00-2018-09-23 17:51:00 the data separated by day is 2018-09-21 17:51-2018-09-22 00:00:00, 2018-09-22 00:00:00-2018-09-23 00:00:00, 2018-09-23 00:00:00-2018-09-23 17:51:00. According to the same principle of years and months, work out a time interval to check the database