I want to get previous month from 'yyyy-MM' format value in Hive. I tried with 'add_months' but couldn't able to get.
select add_months('2021-06', -1)
Eg: I have one string column having value '2021-06', now I want to display output as '2021-05'.
Please help on this.