To convert a date string from one format to another, you need to use two hive date functions
unix_timestamp(string date, string pattern) convert the temporary string with the given pattern for the unix timestamp (in seconds), return 0 if it fails.from_unixtime(bigint unixtime[, string format]) converts the number of seconds from the unix era (1970-01-01 00:00:00 UTC) to a string representing the timestamp of this moment in the current time zone of the system.
Using the above function, you can achieve the desired result.
The input and output of the sample can be seen from below: 
Last request
select from_unixtime(unix_timestamp('2016/06/01','yyyy/MM/dd'),'yyyy-MM-dd') from table1;
where table1 is the name of the table contained in my hive database.
I hope this helps you.
source share