Formatting time as a unix timestamp

0

We are able to enter records into tables using any time unit. But when querying the table, I can only seem to be able to return it as what I can assume is the ISO format. IE: 2021-03-18 04:00:00.055000000

Is there any way to get a query result with a unix like timestamp instead?

DrBomb
質問済み 3年前738ビュー
2回答
0
承認された回答

You can use the to_unixtime() function on the timestamp to convert to unix time e.g. select to_unixtime('2021-03-18 04:00:00.055000000')

AWS
回答済み 3年前
0

Thank you, this worked. Any reason why this function is not documented? I don't see it anywhere on the AWS Timestream docs.

DrBomb
回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ