The correct translation is the latter, "duemiladiciannove".
This excerpt comes from How to count past 100 in Italian:
Saying the Year
You can also use these numbers to say the year. Let’s
use the year 1929 as an example.
The number you’re going to start with will be the biggest.
1000 - mille
Then, you’ll use
900 - novecento
Finally, you’ll cover the last two numbers
29 - ventinove
All of that together makes:
millenovecento ventinove
Here are some other years as examples:
2010 - duemila dieci
2000 - duemila
1995 - millenovecento novantacinque
1984 - millenovecento ottantaquattro
As correctly pointed out by @egreg, it should be noted that the number, when spelled out with letters, should be written as one long word.
In fact Accademia della Crusca in this article talking about the use of the article with dates and figures, named L'articolo con le date e le cifre says:
Per estensione, si può aggiungere che, nel caso di una data come
11/10/1989, l'articolo che vi si anteporrà sarà l' (seguendo la
pronuncia della data: l'undici ottobre millenovecentoottantanove);
stessa regola vale per le date che iniziano con 1: anche per queste,
si considera il modo in cui tali date vengono pronunciate e quindi si
scriverà il 1/2/2003 (cioè il primo febbraio duemilatré).
Moreover in the same article is stated that:
È preferibile usare le cifre anche per le date e per i numeri non
arrotondati («Sono nato nel 1956», «Bologna, 15 febbraio 2000», «Il
candidato ha conseguito 1805 voti di preferenza, pari al 4,6 per
cento»).