It has been a hot debate, for the past few hundreds years, as to whether or not the the Biblical Genesis account of creation is literal or allegorical. Despite what most pastors may be preaching on a regular basis, there is currently no common agreement amongst theologians as to the the answer.
In traditional jewish theology and in the early Christian church, it was not taught that the the creation story was an account of seven literal days. In fact, at that time most Christian and Jewish teachers felt that to entertain such a question was to miss the point of the Genesis account entirely.
It was the common thought in the early church years that the story of creation had been separated into multiple days and a compounding sequence because there was a need for order to aid in its understanding. The proper interpretation of the creation story revolved around what was taught and symbolized, rather than battling between literal and allegorical canaille.
It was't until the 1500s when the Protestant Reformation took place, that the emphasis for scripture interpretations became focused upon literacy. It was at this time that Martin Luther expounded the idea of earth being created in six literal days and God resting on a literal seventh.
Since the time of Martin Luther, theologians have been heavily debating the idea of a having a literal or allegorical interoperation of the creation story. This has unfortunately led to many ill constructed sermons and teaching, based on the Genesis account, that do not hold true the original intent of the story. It is for this reason, that many still hold true the teachings of the Jewish and early Christian teachers by believing in a deeper meaning of the story which radically transcends the current debate.