postgresql - 不起作用的时间戳 where 子句
问题描述
我的查询是返回两个时间戳日期和时间之间的所有记录。
这被用于 30 分钟的时间间隔。我失败的查询示例应返回 27 行数据,2/1/2019 1:30:00
并2/1/2019 01:59:00
返回 14582 行,日期范围为2/1/2019 13:04:00
至2/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"
解决方案
推荐阅读
- python - 无法在 django 中使用电子邮件登录
- python - 用beautifulsoup在表中搜索字符串并打印标题
- mongodb - 查询上限集合时出现 MongoDB 错误
- powershell - Azure DevOps - Setting and Using Variables in PowerShell Scripts
- javascript - HTML 按钮可能与 JavaScript 函数冲突?
- c - Constructing and returning Julia types in C
- azure-data-lake - 安装 Azure U-SQL 扩展以在本地运行 R/Python 脚本?
- c - Is it possible to use a reduction variable from a passed-by-pointer argument inside an orphaned C routine?
- couchdb - 如何在 couchdb 中查找使用大小数组
- php - PHP CodeIgniter:更新绑定到输入字段的动态数组