I have an external partitioned Hive table. One of its columns is a string named OLDDATE that has the date in a different format(DD-MM-YY). I want to update the column and store dates in YYYY-MM-DD format. All years are 20XX.
So I thought of this
select CONCAT('20',SPLIT(OLDDATE ,'-'),'-',SPLIT(OLDDATE ,'-'),'-',SPLIT(OLDDATE ,'-')) from table
This gives me the dates in the format I want. Now how do I overwrite the old date with this new date?