You can't use it like that: for (( "$D"=16; "$D"<=20; "$D"++ ));. Use unexpanded variable names like for (( i=1; i<5; i++ )); do echo $i; done. $D is already expanded by the shell.
The -d option of date takes one single date only, not several separated by a line feed char. How about
D="$(stat -c %z sh* | awk -F"[ -]" '{print $3}')"
echo "$D"
03
03