It's a space that's causing your problem.
A variable assignation followed by a command sets that variable ONLY within the scope of that command.
e.g.
var=gubbins aScript; echo $var
The above would set var to "gubbins" within the context of aScript. The subsequent echoing of $var would output an empty string as var would remain unset in the current shell.
What you are trying to do is set 'a' to an empty string within the context of the command derived from the output of mydate.txt.
i.e.
a= `cat mydate.txt`
is the same as...
a= 20040714
...and seen as there is no such command as 20040714 you get the error.
In short, what you really mean is...
a=`cat mydate.txt`
Incidentally, seen as you are only talking about a single line, you could also write this as...
read a < mydate.txt