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
demandé il y a 3 ans726 vues
2 réponses
0
Réponse acceptée

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
répondu il y a 3 ans
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
répondu il y a 3 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions