过滤器SQLITE UNIX TIMESTAMP数据HH:MM:SS零件
我的SQLite DB中有以下记录。
**SESSION** **DATETIME **BID** ASK**
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240126 1979.74 1979.99
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240129 1979.73 1979.97
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240129 1979.73 1979.92
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240129 1979.7 1979.92
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240130 1979.68 1979.91
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240130 1979.68 1979.89
我的目标是从DateTime字段中提取HH:MM:SS时间并进行过滤。看起来应该认为,
SELECT * from table where strftime('%H:%M:%S',Datetime) < '00:02:05'
此查询的问题是它不起作用。
有没有办法从UNIX时间提取零件并将其与我的自定义零件进行比较?
I have the following records in my SQlite DB.
**SESSION** **DATETIME **BID** ASK**
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240126 1979.74 1979.99
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240129 1979.73 1979.97
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240129 1979.73 1979.92
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240129 1979.7 1979.92
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240130 1979.68 1979.91
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240130 1979.68 1979.89
My goal is to extract the hh:mm:ss time from the DATETIME field and to filter it. It should look some think like that
SELECT * from table where strftime('%H:%M:%S',Datetime) < '00:02:05'
The problem with this query is that it's not working.
Is there a way to extract the part from the unix time and compare it to my custom one ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用
'Unixepoch'
修改器:You need the function
time()
with the'unixepoch'
modifier: