William served in the army from 1814 onward. Like his father he fought against Napoleon I of France during the part of the Napoleonic Wars known in Germany as the Befreiungskriege ("Wars of Liberation", otherwise known as the War of the Sixth Coalition), and was reportedly a very brave soldier. He was made a captain (Hauptmann) and won the Iron Cross for his actions at Bar-sur-Aube. The war and the fight against France left a lifelong impression on him, and he had a long-standing antipathy towards the French.In 1815, William was promoted to major and commanded a battalion of the 1. Garderegiment. He fought under Gebhard Leberecht von Blücher at the Battles of Ligny and Waterloo. He became a diplomat, engaging in diplomatic missions after 1815. William was a brother of Empress Alexandra Feodorovna of Russia (née Charlotte of Prussia). In 1817 he accompanied his sister to Saint Petersburg.In 1816, William became the commander of the Stettiner Gardelandwehrbataillon and in 1818 was promoted to Generalmajor. The next year, William was appointed inspector of the VII. and VIII. Army Corps. This made him a spokesman of the Prussian Army within the House of Hohenzollern. He argued in favour of a strong, well-trained and well-equipped army. In 1820, William became commander of the 1. Gardedivision and in 1825 was promoted to commanding general of the III. Army Corps.In 1826 William was forced to abandon a relationship with Polish noblewoman Elisa Radziwill, his cousin whom he had been attracted to, when it was deemed an inappropriate match by his father. It is alleged that Elisa had an illegitimate daughter by William who was brought up by Joseph and Caroline Kroll, owners of the Kroll Opera House in Berlin, and was given the name Agnes Kroll. She married a Carl Friedrich Ludwig Dettman (known as "Louis") and emigrated to Sydney, Australia, in 1849. They had a family of three sons and two daughters. Agnes died in 1904.In 1829, William married Princess Augusta, the daughter of Grand Duke Karl Friedrich of Saxe-Weimar-Eisenach. Their marriage was outwardly stable, but not a very happy one.In 1840 his older brother became King of Prussia. Since he had no children, William was first in line to succeed him to the throne and thus was given the title Prinz von Preußen. Against his convictions but out of loyalty towards his brother, William signed the bill setting up a Prussian parliament (Vereinigter Landtag) in 1847 and took a seat in the upper chamber, the Herrenhaus.During the Revolutions of 1848, William successfully crushed a revolt in Berlin that was aimed at Frederick William IV. The use of cannons made him unpopular at the time and earned him the nickname Kartätschenprinz (Prince of Grapeshot). Indeed, he had to flee to England for a while, disguised as a merchant. He returned and helped to put down an uprising in Baden, where he commanded the Prussian army. In October 1849, he became governor-general of Rhineland and Westfalia, with a seat at the Electoral Palace in Koblenz.During their time at Koblenz, William and his wife entertained liberal scholars such as the historian Maximilian Wolfgang Duncker, August von Bethmann-Hollweg and Clemens Theodor Perthes. William's opposition to liberal ideas gradually softened.In 1854, the prince was raised to the rank of a field-marshal and made governor of the federal fortress of Mainz. In 1857 Frederick William IV suffered a stroke and became mentally disabled for the rest of his life. In January 1858, William became Prince Regent for his brother, initially only temporarily but after October on a permanent basis. Against the advice of his brother, William swore an oath of office on the Prussian constitution and promised to preserve it "solid and inviolable". William appointed a liberal, Karl Anton von Hohenzollern-Sigmaringen, as Minister President and thus initiated what became known as the "New Era" in Prussia, although there were conflicts between William and the liberal majority in the Lan

Question: When was he elected governor general of Rhineland?
Answer: October 1849