使用PartiQL将DynamoDB中的日期从Unix格式转换。

huangapple go评论123阅读模式
英文:

Convert date in DynamoDB from unix format using PartiQL

问题

我正在尝试使用PartiQL的新AWS功能从DynamoDB中选择数据。我注意到日期变量在DynamoDB中以Unix格式存储。然而,我想将它转换成人类可读的格式,比如GMT。

我已经尝试了下面的表达式,但它不起作用,给了我一个错误:

SELECT num_id, Date(last_activity_time)
FROM "cc-our-table"

是否有其他解决方案来将它转换为GMT?

英文:

I am trying to select data from DynamoDB using the PartiQL new AWS feature. I have noticed that the date variable is stored in Unix format in Dynamodb. However, I want to convert it into human readable format such as GMT.

I have used the next expression but it does not work, it gave me an error

SELECT num_id, Date(last_activity_time)
FROM "cc-our-table"

Is there any other solution how to convert it into gmt

答案1

得分: 1

Unfortunately PartiQL doesn't provide the ability to cast values.

英文:

Unfortunately PartiQL doesn't provide the ability to cast values.

huangapple
  • 本文由 发表于 2023年3月8日 18:51:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/75672078.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定