clickhouse now()带有毫秒
我正在尝试在Clickhouse中获取当前的DateTime。有函数now()
我可以使用,但是精度仅在几秒钟之内,
select now();
-- result 2022-05-05 10:34:48
select toUnixTimestamp(now());
-- result 1651746940
任何想法我如何才能以毫秒精度获得当前的日期时间?
I'm trying to get a current datetime in the Clickhouse. There is function now()
that could I use but the precision is just in seconds
select now();
-- result 2022-05-05 10:34:48
select toUnixTimestamp(now());
-- result 1651746940
Any idea how could I get the current datetime with a milliseconds precision?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
now64
函数-64函数
tounixTimestamp64milli()
等。Try
now64
functionThere are related -64 functions like
toUnixTimestamp64Milli()
etc.