Well, hanuman, I'm not sure whether my opinion is that expert, but I'll see what I can do. Of your sentences, number 2 is correct. In the first one, a determiner is missing, in this case "the" if you want the sentence to convey the same meaning as the second one: "He worked the whole day", meaning "the entire day", "all day long".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.