A few things.
The first is that you shouldn't be using set, that's for shell variables rather than environment variables.
Second, unless $line is an actual command, you need to echo it.
Third, your closing quote on the sed command is the wrong type, ’ instead of '.
So, you should be using:
a="$(echo $line|cut -d'-' -f 2|cut -d'.' -f 1|sed 's/[^0-9]*//g')"
You can see this in action in the following transcript:
pax> line="date=2014.09.05-time=12.34.56"
pax> a="$(echo $line|cut -d'-' -f 2|cut -d'.' -f 1|sed 's/[^0-9]*//g')"
pax> echo $a
12
which grabs the second - delimited field (time=12.34.56), then the first . delimited field from that (time=12), then strips off all non-numerics at the start to give just 12.