UDF's are great but if you do not want to use one, you can still convert
Long dates into short dates using the set of inbuilt functions.

Thu Mar 19 08:30:06 +0000 2015 (stored as string) can be converted
into 2015-03-19 14:00:06 (stored as date timestamp object - all times
referred from local time zone in Hive)

select created_at,
>
>        unix_timestamp(created_at,"EE MMM dd HH:mm:ss ZZZZ yyyy"),
>
>        from_unixtime(unix_timestamp(created_at,"EE MMM dd HH:mm:ss ZZZZ
>> yyyy"))
>
> from twitter_data limit 10;
>
>
--
Thanks,
Raunak Jhawar

Reply via email to