I am trying to get the first and last date of a quarter using hive.
For first day of the quarter this works fine :
select trunc(add_months(from_unixtime(unix_timestamp()),-(month(from_unixtime(unix_timestamp()))-1)%3),'MM') as Firstday_quarter
But I am not able to retrive the last day of the quarter using hive. Ex: 2021-12-31 in this case
Could you please help me.