For how many days can humans survive without the sun?
It's difficult to calculate exactly how many days we can survive but one alternative source of energy which can be considered is the earth's core.
Without the sun the plants will be the first to die and that will kill all the animals dependent on the plants which will then kill the carnivores which depend on herbivores. this might happen within a years time.
Humans on the other hand I think can come up with ingenious methods to survive this catastrophe, so humans may survive longer.
Scientists have been thinking about this problem whether it is possible to have a life on a rogue planet (i.e. a planet without a star). the argument is that the core's heat can be used to generate electricity which in turn can be used for many different tasks, such as manufacturing oxygen and illuminating plants for food.