作者:vaaal52653 | 来源:互联网 | 2023-05-18 05:27
This question already has an answer here:
这个问题在这里已有答案:
I have table:
我有桌子:
CREATE TABLE B(
...
date1 TIMESTAMP(6),
date2 TIMESTAMP(6),
...);
and I want to get hours between two timestamps. So I run query:
我想在两个时间戳之间得到几个小时。所以我运行查询:
SELECT (date1 - date2)*24 from B;
Result looks like this: +000000024 00:00:00.000000 but I want something like 24:00. How I can format the query? Thanks
结果如下所示:+000000024 00:00:00.000000但我想要24:00这样的东西。我如何格式化查询?谢谢
2 个解决方案