Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
作为进入 ELK 集群的 SQL 查询的一部分,我有两个字段:
"TO_TIME": "22-FEB-17 10.37.21.000000000 AM", "FROM_TIME": "22-FEB-17 10.34.37.000000000 AM"
有没有办法在每条日志消息中获取此字段之间的时间差(在本例中为 2 分 44 秒)并通过 Kibana 显示?
如果这不起作用,Oracle SQL 查询也会起作用
提前致谢!
这是甲骨文的答案。Oracle 没有 datediff 函数,但您可以使用数学。概念是。
to_time - from_time = a floating point number The integer portion of that number represents days. The decimal portion represents partial days. In other words, 1.5 would represent 36 hours.
现在您所要做的就是将该概念应用于您的要求。