且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将 unix 时间戳转换为 H2 时间戳

更新时间:2023-01-22 12:24:28

好的,使用以下公式即可:

Ok, using the following formula works:

select DATEADD('SECOND', 1348560343, DATE '1970-01-01')

只要记住将时间戳除以 1000.使用 'MILLISECOND' 不起作用,你会得到 Numeric value out of range.

Just remember to divide the timestamp with 1000. Using 'MILLISECOND' doesn't work, you will get Numeric value out of range.