spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tzahi File <>
Subject Convert timestamp to unix miliseconds
Date Wed, 04 Aug 2021 20:42:47 GMT
Hi All,

I'm using spark 2.4 and trying to convert a timestamp column to unix with
milliseconds using the unix_timestamp function.

I tried to convert the result to double cast(unix_timestamp(timestamp) as
I also tried using the timestamp format "yyyy-MM-dd HH:mm:ss.sss" and no
matter what I already tested I just kept getting the unix time in seconds.

Looking for any new ideas.


View raw message