将时间格式化为Unix时间戳

0

【以下的问题经过翻译处理】 我们可以使用任何时间单位来将记录输入表中。但是当查询表时,我似乎只能将其返回为我可以认为是ISO格式的方式。例如:2021-03-18 04:00:00.055000000。

是否有办法以Unix时间戳的形式获取查询结果?

profile picture
EXPERT
asked 8 months ago15 views
1 Answer
0

【以下的回答经过翻译处理】 你可以使用to_unixtime()函数将时间戳转换成UNIX时间,例如:select to_unixtime('2021-03-18 04:00:00.055000000')。

profile picture
EXPERT
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions