Pumpkins usually only last a few days after you carve them. This is due to a number of factors, such as oxidation or oxygen and simple hydration. The skin protects the inside of the pumpkin and, once carved, it lets in other such problems as fungi, bacteria, molds and insects.
Although pumpkins may last only a couple of days after carving in warmer climates, they can last a bit longer in colder climates. In fact, one way to preserve a pumpkin once it is carved is to keep it in the refrigerator. The idea is to seal it from loss of moisture.