name time product
A 2016-1-2 13:23:00 WFEY
B 2016-2-17 11:43;34 ASG
A 2017-1-10 15:23:00 SGH
C 2015-4-5 13:47:20 HRT
C 2016-7-12 19:56:03 XCC
A 2017-3-4 14:00:00 ESFW
SELECT DISTINCT OO.name
FROM (SELECT name,DATE_FORMAT(time , '%h:%m') AS ti FROM goods) AS OO
WHERE ti BETWEEN '12:00' AND '14:00';