Batch change creation dates based on file names using setFile
To me it looks like the problem is with the quotes. Try to copy paste this into your script:

for f in *; do
t="${t%%.*}"
t="${t%%-*}"
m="${t:5:2}"
d="${t:8:2}"
y="${t:0:4}"
h="${t:11:2}"
m="${t:14:2}"
s="${t:17:2}"
date="$m/$d/$y $h$m$s"
setFile -d $date "$f"
done