When did Li Yuan declare himself emperor of the Tang dynasty?
Li Yuan declared himself emperor on the 18th of June 618 following the murder of Emperor Yang by General Yuwen Huaji. This event marked the official founding of the Tang dynasty after decades of fragmentation under the collapsing Sui dynasty.