I know the question seen simple and it should be a simple answer but I spent sometime in this and can´t resolve it. Some help would be really appreciated. I'm using SQL on HUE Hive.
TO_DATE(col) works alright but only returns date, but not the time. For what I understand the original format is UTC string
I believe the code should be something like and I'm probably misplacing the fields.
from_unixtime(unix_timestamp(column_name, 'yyyy-MM-dd HH:mm:ss.S'), 'yyyy-MM-dd')
As a result I get NULL instead desired: 'yyyy-MM-dd HH:mm:ss'