如何在SQL中搜索数据时间戳

时间:2019-04-18 12:24:48

标签: mysql

SELECT * 
FROM dbPLC.dbo.PLC_CPacking3KW2P3 AS A 
INNER JOIN dbPLC.dbo.PLC_CPacking3KW2P3 AS B ON B.NoUrut = A.NoUrut - 1 
WHERE A.Nilai - B.Nilai = 1 
AND CONVERT(DATE, A.TimeStamp) = CONVERT(DATE, '2017/08/13') 
AND DATEPART(HOUR, DATEADD(DAY, 1, A.TimeStamp)) BETWEEN 7 AND 15

我想在09:00:00和10:00:00之间查询 谢谢您的答复。

1 个答案:

答案 0 :(得分:0)

我找到了解决方法。

application.yml