First of all, here's Jonah Goldberg's (perennial) Groundhog Day column; I completely agree with his contention that it's great comedy and a great moral lesson. But how long was Bill Murray stuck there?
"I think the 10-year estimate is too short. It takes at least 10 years to get good at anything, and allotting for the down time and misguided years he spent, it had to be more like 30 or 40 years…"
Here's an amazingly detailed subsequent analysis that concluded it must have been at least 34 years, and here are some additional interesting Groundhog Day links.