Adam and Eve lived many years after they were banned from Eden, although it may be true that, in some sense, they actually did die on the very day that they ate of the forbidden fruit.Answers in Genesis offers a plausible explanation of this apparent contradiction:
The phrase “you shall surely die” can be literally translated from the Hebrew Biblical text as “dying you shall die.” In the Hebrew phrase we find the imperfect form of the Hebrew verb (you shall die) with the infinitive absolute form of the same verb (dying). This presence of the infinitive absolute intensifies the meaning of the imperfect verb (hence the usual translation of “you shall surely die”).This grammatical construction is quite common in the Old Testament, not just with this verb but others also, and does indicate (or intensify) the certainty of the action. The scholarly reference work by Bruce K. Waltke and M. O’Conner, An Introduction to Biblical Hebrew Syntax (Winona Lake: Eisenbrauns, 1990), gives many Biblical examples of this,  and they say that “the precise nuance of intensification [of the verbal meaning] must be discovered from the broader context”.
 Clearly in the context of Gen. 3, Adam and Eve died spiritually instantly—they were separated from God and hid themselves. Their relationship with God was broken. But in Romans 5:12 we see in context that Paul is clearly speaking of physical death (Jesus’ physical death, verses 8-10, and other men’s physical death, in verse 14). We also find the same comparison of physical death and physical resurrection in 1 Corinthians 15:20-22.So both spiritual death and physical death are the consequences of Adam’s fall.A relevant passage to this discussion is found in Numbers 26:65. There we find “they shall surely die” (literally: dying they shall die). These are the same Hebrew verbs and the same grammatical construction as in Genesis 2:17. God told the Israelites shortly after they came out of Egypt to go into the land of Canaan and take possession of it, as it had been promised to Abraham.In Numbers 26:65 God says that because the adult Jews (20 years and older) refused to trust and obey God and go into the Promise Land, they would die in the wilderness over the course of 40 years (one year for every day that the twelve spies investigated the Land—see Numbers 13:1-14:10). But those rebellious unbelieving Jews did not all die at the same moment. Their deaths were spread over that whole 40-year period.So, dying they did all die and that death occurred at various times some years after God’s pronouncement of judgment.One enquiry sent to me about Genesis 2:17 said that the verse says “in THAT day” you shall surely die. So, the enquirer said, it sure seems to say that Adam would die physically that day. But the demonstrative pronoun,“that,” is not in the Hebrew text at this point. The Hebrew has beyom (בְּיוֹם), where the Hebrew preposition b (ב, usually is translated “in”) is connected as a prefix to yom (יוֹם, which is the word for “day”). This Hebrew temporal adverb is often translated with the English prepositional phrase “in the day that.” This would be the essentially “woodenly literal” translation (although “the” and “that” are not in the Hebrew but are added to make the English sound smooth). But only sometimes (not always) does beyom refer to a literal day, in which case the context makes it clear. This same construction (beyom) appears in Genesis 2:4 and does not refer to a specific 24-hour day but to the whole creation week of six literal days. See also Numbers 7:10-84, where in verses 10 and 84 beyom refers to a period of twelve days of sacrifice.
But a different construction occurs in between those verses. There in verses 12, 18, 24, etc., which describe the sacrifices of each of those days, bayyom (בַּיּוֹם) is used, where the “a” (the vowel mark under the first Hebrew letter on the right) and the dot (dagesh) under the second letter on the right (yod) indicate the definite article “the.” (For days 11 and 12, in verses 72 and 78, we find beyom). The phrase beyom is therefore sometimes rightly translated as “when," referring to a period longer than a day, as in the NIV in both Genesis 2:4 and Genesis 2:17 (and in Numbers 7:10 and 84 and elsewhere—the NAS, HCSB and NKJV versions also translate it as “when” in these verses in Numbers).
So, from all this we conclude that the construction “dying you shall die” and beyom in Genesis 2:17 do not require us to conclude that God was warning that “the very day you eat from the tree is the exact same day that you will die physically.” The Hebrew wording of Genesis 2:17 allows for a time lapse between the instantaneous spiritual death on that sad day of disobedience and the later physical death (which certainly did happen, just as God said, but for Adam it was 930 years later). As Scripture consistently teaches, both kinds of death (spiritual and physical) are the consequence of Adam’s rebellion. Therefore, Hugh Ross and other old-earth proponents are not correct when they say that spiritual death was the only consequent of Adam’s rebellion at the Fall.
 Bruce K. Waltke and M. O’Conner, An Introduction to Biblical Hebrew Syntax, Winona Lake, Eisenbrauns, 1990, pp. 584–588.
 Ibid, p. 585.
Scripture is very clear that had Adam and Eve not sinned, they and humanity would not have experienced death, either physically or spiritually. The aging process is part of the dying process. Therefore, the day Adam and Eve sinned, the process of dying or the process of aging began. They also died spiritually on that day. Their relationship with God had dramatically changed for the worse.
According to 1 Corinthians 15:22, everyone who dies does so because of Adam's transgression. Nevertheless, though all die in Adam, in Christ, who is sometimes referred to as the second Adam, all shall be made alive (1 Corinthians 15:22). Scripture also says, "The first man Adam became a living being. The last Adam became a life-giving spirit" (1 Corinthians 15:45).