Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 如何将自然时间转换为TSO

Is there any way to convert natural time to TSO?
Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 如何将自然时间转换为TSO
Is there any way to convert natural time to TSO?
Convert TSO
SELECT TIDB_PARSE_TSO(445015622227853318);
SELECT conv(concat(bin(unix_timestamp('2022-01-06 12:30:59') * 1000),'000000000000000001'),2,10);
select REPLACE(unix_timestamp(current_timestamp(3)),'.','') <<18 as current_tso;
Additionally, refer to the documentation at TiDB 中的 TimeStamp Oracle (TSO) | PingCAP 文档中心
SELECT TIDB_PARSE_TSO(445015622227853318);
SELECT conv(concat(bin(unix_timestamp('2022-01-06 12:30:59') * 1000),'000000000000000001'),2,10);
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.