They can survive out of the water for days, I bet easily for a week, two weeks might be already too long and they would be hungry, maybe even too weak to recover. Adult apple snails are sometimes shipped in a padded box with damp paper towels around the snails. They just close their shells and breathe air from time to time. In a dry place they would dry up rather soon though. I advise not to try it just for fun, they are more comfortable in water.
And about the feeding. As already said, soft vegetables are good, salad, peas etc. And feeding it at nigh since they are more active then. But if it looks like it still doesn't eat, you could lift it up and put it in a container with some water and food on the bottom. Just make sure you don't drop the snail and don't leave it alone, it might escape and drop. Their shell is fragile.