In modern English usage, the phrase most commonly appears as dressed to the nines or dressed up to the nines.
Origin
The phrase is said to be Scottish in origin. The earliest written example of the phrase is from the 1719 Epistle to Ramsay by the Scottish poet William Hamilton:
The bonny Lines therein thou sent me,
How to the nines they did content me.
Robert Burns' Poem on Pastoral Poetry, published posthumously in 1800, also uses the phrase:
Thou paints auld nature to the nines,
In thy sweet Caledonian lines.
Dressed to the nines.
Adjective
dressed to the nines (not comparable)
1. (idiomatic) Very fancily or formally dressed; wearing very showy or splendid clothing.
- He arrived at the gala, dressed to the nines in his top hat and tails.
- 1976, Tim Rice, Don't Cry For Me Argentina
All you will see is a girl you once knew, although she's dressed up to the nines, at sixes and sevens with you.
References
Dressed to the nines in Michael Quinion, Ballyhoo, Buckaroo, and Spuds, 2004.
source: wikipedia, wiktionary