I have bash variable named date_export that have 2021-09-22 as a value.
I want assign it to other bash variable named DATE_EXPORT but having other format 20210922
I tried :
DATE_EXPORT=$(date -d ${date_export} + '%Y%m%d')
But, it does not work, any help, please
date -d "$date_export" '+%Y%m%d'should work