I have the following SQL:
select cast(to_unixtime(date_trunc('hour', current_timestamp)) AS bigint);
Basically I always go back to the beginning of the time, take that timestamp and try to get the Unix time.
However, this is printing a value like this, which is in seconds: 1708473600 but I want it to be in milliseconds, something like 1708473600000 .
I can't seem to find an example in the Trino documentation on how to do this. They have a to_millisecond method that takes an interval. I just want to provide a timestamp and get the unix epoch time in ms.