A few hours seems to be the upper limit...see : http://www.askabiologist.org.uk/answers/viewtopic.php?id=506
According to this source, some unlucky real life whaler got swallowed by one and survived a few hours.but I think that this happened pecause the whale was quickly put on air by the humans who freed the whaler, causing the whale to swallow lots of air.Usually, I think there is nearly no air in a whales stomach, so usually you would survive a few minutes due to oxygen lack.