2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
I did manage to find one solution so far to this.
You can either:
-
Convert Timestamps to ms before doing your math with to_milliseconds()
to_milliseconds( (2022-04-29 13:15:53::Timestamp)) - to_milliseconds((2022-04-29 12:58:30::Timestamp)) = 1043000::int?
-
Or apparently you can cast an Interval with the same function to a number
to_milliseconds((2022-04-29 13:15:53::Timestamp) - (2022-04-29 12:58:30::Timestamp)) = 1043000::int?
Again if someone could point me to a the entire supported SQL syntax for this service that would be awesome. I do not see the function to_milliseconds() even listed in the documentation I linked to above.
Thank you for any help offered.
답변함 2년 전
0
Here is the final answer I was looking for, and now it's here for reference!
As vaguely mentioned here, but not explicitly stated as such the syntax is TrinoDB's with support for some? all? functions.
Here is a link to the datetime functions specifically: https://trino.io/docs/current/functions/datetime.html
답변함 2년 전
관련 콘텐츠
- AWS 공식업데이트됨 2년 전