I am using following code to set date in Hive
SET DATE_DM2=date_sub(from_unixtime(unix_timestamp(),'yyyy/MM/dd'), cast(((from_unixtime(unix_timestamp(), 'u') % 7)+1) as int));
But When I am running the following select statement I am not getting the output
select * from TableName where partitiondate='${DATE_DM2}';
Is there anything wrong with the syntax ?