The first thought that comes to mind for me isn't what the current answers have dictated. Why does the creature need to have some sort of skin that "changes" form?
First, the satisfy the day/night criteria, we can say that this creature has evolved to sleep during the day and not the night. Nocturnal, like bats.
Because the creature now sleeps in the daytime, we're automatically satisfying the immobility factor.
All that's left is how it turns "rock hard", which is simple.
Think "extendable armor plating". First, the theory: When you have 2 thick pieces of material like so:
|=====||=====| (where each |=====| section represents a plate)
The plates can't move back and forth. They're very sturdy as well. So how do we give this the ability to move? First, we have to modify the plates. I think having diagonal connection slots would do the trick. If there were a muscle under each plate that pushes it up slightly, and the creature had slight hunch (or a lot of curvature), it could look something like this:
\=====/ \=====/ \=====/ (where the \ and / represent the the sides of the plates)
| | | (each | represents a muscle in the extended position)
As you can see, in this setup, the armor plates are no longer touching while the muscles are extended, which means that they're effectively "mobile" plates. Now our creature has full mobility when needed, and when it needs to hunch over and go to sleep, pull all the muscles tight, and the plates fall into place perfectly, creating a seamless "shell".
These plates can be made of really thick skin, if you want, or even bone. With the right bone density, these things could be ridiculously tough to kill.