2 Answers
- Newest
- Most votes
- Most comments
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.
answered 2 years ago
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
answered 2 years ago
Relevant content
- Accepted Answerasked 2 years ago
- asked 2 months ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago