Welcome to forums, hope you will enjoy learning/sharing knowledge here.
Could you please try following and let me know if this helps you.
date -d "$YESTERDAY" +"%s000"
Output will be as follows.
1482753600000
So if you run code date -d '($YESTERDAY)' +"%s000" or date -d 0 +"%s000" both will give same result as 1482814800000 , so you could get it as it is taking it's value as 0 for '($YESTERDAY)' .