There's no way to tell you that. Too many variables are involved. Use your senses to tell if it is spoiled. Check for off-odors, sliminess, mold and discoloration.
A carved pumpkin will last around a month. But it also depends on how much you have carved out. If you carve a lot out it will go rotten faster. But if you never carve anything out of the pumpkin it...