Well, as the error says, innerHTML is not a function.
You can assign a value to the property, though:
document.getElementById("dated").innerHTML = month + "https://stackoverflow.com/" + day + "https://stackoverflow.com/" + year;
For more infos, have a look at the MDN docs.