首页 > 解决方案 > 不起作用的时间戳 where 子句

问题描述

我的查询是返回两个时间戳日期和时间之间的所有记录。

这被用于 30 分钟的时间间隔。我失败的查询示例应返回 27 行数据,2/1/2019 1:30:002/1/2019 01:59:00返回 14582 行,日期范围为2/1/2019 13:04:002/1/2019 01:59:00

我已经尝试使用<=and>=作为范围,并尝试使用 between。我得到相同数量的记录返回枯萎的方式。

select "ACD Login ID", "Start"
from prdintfeb where
"Start"::timestamp>=timestamp '2/1/219 01:30:00' and "Start"::timestamp <= timestamp '2/1/2019 01:59:00'
order by "Start"

标签: postgresql

解决方案


推荐阅读