Question: When did the person chosen to be president of the confederacy end his fight in the Mexican-American war?

Knowledge 1: President of the Confederate States of America
The president was indirectly elected by the people through the Electoral College to a six - year term, and was one of only two nationally elected Confederate officers, the other being the Vice President. On February 18, 1861, Jefferson Davis became president of the provisional government. On February 22, 1862, he became president of the permanent government and served in that capacity until being captured by elements of the United States Cavalry in 1865. [SEP] Knowledge 2: Jefferson Davis
Davis was born in Fairview, Kentucky, to a moderately prosperous farmer, the youngest of ten children. He grew up in Wilkinson County, Mississippi, and also lived in Louisiana. His eldest brother Joseph Emory Davis secured the younger Davis's appointment to the United States Military Academy. After graduating, Jefferson Davis served six years as a lieutenant in the United States Army. He fought in the Mexican–American War (1846–1848), as the colonel of a volunteer regiment. Before the American Civil War, he operated a large cotton plantation in Mississippi, which his brother Joseph gave him, and owned as many as 113 slaves. Although Davis argued against secession in 1858, he believed that states had an unquestionable right to leave the Union.
Knowledge 1: Confederate States Army
The Confederate States Army (C.S.A.) was the military land force of the Confederate States of America (Confederacy) during the American Civil War (1861 - 1865). On February 28, 1861, the Provisional Confederate Congress established a provisional volunteer army and gave control over military operations and authority for mustering state forces and volunteers to the newly chosen Confederate president, Jefferson Davis (1808 - 1889). Davis was a graduate of the U.S. Military Academy on the Hudson River at West Point, New York, and colonel of a volunteer regiment during the Mexican -- American War (1846 - 1848). He had also been a United States Senator from Mississippi and U.S. Secretary of War in the administration of 14th President Franklin Pierce (1853 - 1857). On March 1, 1861, Davis assumed control of the military situation at Charleston, South Carolina on behalf of the Confederate States government, where South Carolina state militia threatened to seize Fort Sumter, an island fortification in Charleston harbor from the small U.S. Army garrison. By March 1861, the Provisional Confederate Congress expanded the provisional forces and established a more permanent Confederate States Army. [SEP] Knowledge 2: Jefferson Davis
Davis was born in Fairview, Kentucky, to a moderately prosperous farmer, the youngest of ten children. He grew up in Wilkinson County, Mississippi, and also lived in Louisiana. His eldest brother Joseph Emory Davis secured the younger Davis's appointment to the United States Military Academy. After graduating, Jefferson Davis served six years as a lieutenant in the United States Army. He fought in the Mexican–American War (1846–1848), as the colonel of a volunteer regiment. Before the American Civil War, he operated a large cotton plantation in Mississippi, which his brother Joseph gave him, and owned as many as 113 slaves. Although Davis argued against secession in 1858, he believed that states had an unquestionable right to leave the Union.
Knowledge 1: President of the Confederate States of America
The president was indirectly elected by the people through the Electoral College to a six - year term, and was one of only two nationally elected Confederate officers, the other being the Vice President. On February 18, 1861, Jefferson Davis became president of the provisional government. On February 22, 1862, he became president of the permanent government and served in that capacity until being captured by elements of the United States Cavalry in 1865. [SEP] Knowledge 2: White House of the Confederacy
The White House of the Confederacy is a historic house located in the Court End neighborhood of Richmond, Virginia. Built in 1818, it was the main executive residence of the sole President of the Confederate States of America, Jefferson Davis, from August 1861 until April 1865. It was viewed as the Confederate States counterpart to the White House in Washington, D.C.

Answer: 1848