Others have focused on "begotten"; I will focus on "day."
It is quite interesting to note that there is a distinct possibility that this "day" is of the same duration as the "day" God addresses in Genesis 2:17--the one in which Adam died for eating the prohibited fruit (Adam lived to be 930 years old).
For a thousand years in thy sight are but as yesterday when it is
past, and as a watch in the night. (Psalm 90:4, KJV)
But, beloved, be not ignorant of this one thing, that one day is with
the Lord as a thousand years, and a thousand years as one day. (2
Peter 3:8, KJV)
To God, a "day" can mean 1000 years.
Looking next at the timeline of events, we see that David lives at about the very beginning of the 1000-year period preceding Christ's birth. Coincidence?
Most people would say that David was just a few years too early. But let's look carefully at the dates, based on the Biblical record.
Our biggest help is the 490-week prophecy of Daniel, representing 490 years per the Ezekiel 4:6 and Numbers 14:34 day-for-year time formulae, that dates Jesus' ministry and crucifixion.
24 Seventy weeks are determined upon thy people and upon
thy holy city, to finish the transgression, and to make an end of
sins, and to make reconciliation for iniquity, and to bring in
everlasting righteousness, and to seal up the vision and prophecy, and
to anoint the most Holy. 25 Know therefore and understand,
that from the going forth of the commandment to restore and to build
Jerusalem unto the Messiah the Prince shall be seven weeks, and
threescore and two weeks: the street shall be built again, and the
wall, even in troublous times. 26 And after threescore and
two weeks shall Messiah be cut off, but not for himself: and the
people of the prince that shall come shall destroy the city and the
sanctuary; and the end thereof shall be with a flood, and unto the end
of the war desolations are determined. 27 And he shall
confirm the covenant with many for one week: and in the midst of the
week he shall cause the sacrifice and the oblation to cease, and for
the overspreading of abominations he shall make it desolate, even
until the consummation, and that determined shall be poured upon the
desolate. (Daniel 9:24-27, KJV)
"Seventy weeks" = 490 days. Taking those as years, we have the following times:
7 weeks = 49 days = 49 years
62 weeks = 434 days = 434 years
- - - - - - - - - - - - - - - - - - - - - - -
69 weeks = 483 days = 483 years
Followed by:
1 week = 7 days/years
The prophecy says that the Messiah will be "cut off" (a reference to death) in the midst of that final week, known to have been in AD 30/31. The start of that week would be Jesus' ministry, which begins at his baptism, in AD 27. (The week would end in AD 34 at the stoning of Stephen, which was the final act sealing the rejection of Israel as God's chosen people, and the Gospel went out to the Gentiles.)
From there we can work backward to the prophecy's beginning point.
AD 27 - 483 years = 456 BC -1 year (because there was no zero year between BC/AD) = 457 BC
That was the proclamation to restore and rebuild Jerusalem--and we find it in Ezra 7:7-28, and several other passages. The proclamation itself appears to be given more than once, and is completed 49 years after it is begun. The work was stopped due to hassling for about three years, and the Jews are on record as telling us that the total time it took to build the temple was 46 years. So this "seven weeks" that are considered separately from the first 69 weeks specifically denote this temple-building period.
Then said the Jews, Forty and six years was this temple in building,
and wilt thou rear it up in three days? (John 2:20, KJV)
As this decree came in the seventh year of the king (see Ezra 7:7, below), and as the king had just come to power following the 70 years' captivity in Babylon, we can then trace back to the last king of Judah, and count the years for each king--OR take a shortcut and follow, instead, the prophecy of Ezekiel 4:4-6 which gives us 390 years from the iniquity of Israel (Jeroboam son of Nebat's sin in diverting the people away from worship in Solomon's temple to worship idols in the high places) until the destruction of the temple, which occurred in about the 18th or 19th year of the captivity on the third siege of Jerusalem.
And there went up some of the children of Israel, and of the priests,
and the Levites, and the singers, and the porters, and the Nethinims,
unto Jerusalem, in the seventh year of Artaxerxes the king. (Ezra 7:7,
KJV)
Apparently, this "Artaxerxes" was an interesting figure who had come to the throne as king Darius, and having conquered many internal enemies rose to the title of Ahasuerus, after which, having expanded his kingdom into regions beyond, became "Artaxerxes," a title fit for an emperor. (But this history goes beyond the scope of this answer which is more focused on the time involved.)
Between David and Jeroboam there are only the 40 years of Solomon's reign.
And the time that Solomon reigned in Jerusalem over all Israel was
forty years. (1 Kings 11:42, KJV)
So, we can do the full math this way:
-- From David --
40 years for Solomon
390 years until temple destruction
70 years of captivity
-18 years until temple destruction within 70-year period
7 years until decree to restore Jerusalem and its Temple
483 years until AD 27
- 1 year to account for no zero year
- 30 years of Jesus' age at his baptism (to reach his birth year)
941 years total between David's death and Jesus' birth.
(If my math is off by a year or two, forgive me--and yet it would hardly be sufficient to alter the conclusion.)
The end result is that roughly the last sixty years of David's life would have been within the same millennium in which Jesus was born.
Conclusion
It was on that millennial "day" in which Jesus was begotten. God sees a thousand years as a "day" and, as it should, this text reads like a birth announcement for the Messiah, who was born within that period of time.