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년 전740회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠