You have got the wrong quotes. The apostrophe character which you provided in your example is used to quote literal strings. To execute a command and use the output in a shell command, you use backticks. Note the difference here:
'this is a literal string'
`this is a command`
Because it is so easy to confuse backticks with apostrophes, I prefer to use the $() syntax for command output substitution. For example, both of these do exactly the same thing:
As for the set command... I usually only use it for processing positional parameters with getopt, and that's how I've most often seen it used. I find using set to split the output of some command to be a bit difficult to read.
echo "now we have the components of the date output in positional params:"
echo "1 = $1"
echo "1 = $2"
echo "1 = $3"
echo "1 = $4"
echo "1 = $5"
Note that the format of date with no parameters may be locale dependent. It is more robust to explicitly specify the format string which date should use, e.g.
set $(date "+%Y %m %d %H %M %S")
...which will put the year in $1, the month number in $2 etc. See the date manual page for the definitions of the date format strings.
My taste is to not use the set command for this purpose. One reason is that it is not very readable, although any reasonably experience shell script coder should know what it does. A more compelling reason is that you will lose your original positional parameters.
I'd probably do something like this:
eval $(date "+year=%Y month=%m day=%d")
echo "year=$year month=$month day=$day"
eval is also a little obscure, like set, but at least with this method you don't lose your original positional parameters.
I hope that helps.