If you want the exact moment in time, it was conceived mentally on 8th March in this year one thousand six hundred and eighteen, but submitted to calculation in an unlucky way, and therefore rejected as false, and finally returning on the 15th of May and adopting a new line of attack, stormed the darkness of my mind. So strong was the support from the combination of my labour of seventeen years on the observations of Brahe and the present study, which conspired together, that at first I believed I was dreaming, and assuming my conclusion among my basic premises. But it is absolutely certain and exact that "the proportion between the periodic times of any two planets is precisely the sesquialterate proportion of their mean distances..."
Book V, Ch. 3 dates that his Third Law of Planetary Motion occurred to him, translation by E. J. Aiton, A. M. Duncan, and J. V. Field, The Harmony of the World (1997), Vol. 209, p. 411 - Harmonices Mundi (1618)