tried to run the following script in Unix to display text with dates more than 30 days old than current date
awk -v threshold=$(date "--date=$(date) -30day" +%Y%m%d) -F "'" '$1 < threshold' myname.dat | wc -l
got the following error for dates in the format 2019-02-03 in the file myname.dat
date: illegal option -- -
Usage: date [-u] [+format]
date [-u] [mmddhhmm[[cc]yy]]
date [-a [-]sss.fff]
How to resolve?