How to convert a Date String from UTC to Specific TimeZone in HIVE?

前端 未结 2 798
陌清茗
陌清茗 2020-12-19 07:05

My Hive table has a date column with UTC date strings. I want to get all rows for a specific EST date.

I am trying to do something like the below:

Se         


        
2条回答
  •  北海茫月
    2020-12-19 07:48

    This converts to CST with the daylight savings hour shift:

    to_date(FROM_UTC_TIMESTAMP(UNIX_TIMESTAMP(eff_timestamp, "yyyy-MM-dd'T'hh:mm:ss.SSS'Z'") * 1000, 'CST6CDT')) 
    

提交回复
热议问题