<Table> <Tr> <Th_colspan="2"> The Right Honourable Sir John Alexander Macdonald PC GCB KCMG QC </Th> </Tr> <Tr> <Td_colspan="2"> </Td> </Tr> <Tr> <Td_colspan="2"> </Td> </Tr> <Tr> <Th_colspan="2"> 1st Prime Minister of Canada </Th> </Tr> <Tr> <Td_colspan="2"> In office 1 July 1867--5 November 1873 </Td> </Tr> <Tr> <Th> Monarch </Th> <Td> Victoria </Td> </Tr> <Tr> <Th> Governor General </Th> <Td> The Viscount Monck The Lord Lisgar The Earl of Dufferin </Td> </Tr> <Tr> <Th> Preceded by </Th> <Td> Office established (see Canadian Confederation) </Td> </Tr> <Tr> <Th> Succeeded by </Th> <Td> Alexander Mackenzie </Td> </Tr> <Tr> <Td_colspan="2"> In office 17 October 1878--6 June 1891 </Td> </Tr> <Tr> <Th> Monarch </Th> <Td> Victoria </Td> </Tr> <Tr> <Th> Governor General </Th> <Td> The Earl of Dufferin Marquess of Lorne The Marquess of Lansdowne The Lord Stanley of Preston </Td> </Tr> <Tr> <Th> Preceded by </Th> <Td> Alexander Mackenzie </Td> </Tr> <Tr> <Th> Succeeded by </Th> <Td> John Abbott </Td> </Tr> <Tr> <Th_colspan="2"> Joint - Premier of the Province of Canada Premier of Canada West </Th> </Tr> <Tr> <Td_colspan="2"> In office 24 May 1856--2 August 1858 </Td> </Tr> <Tr> <Th> Monarch </Th> <Td> Victoria </Td> </Tr> <Tr> <Th> Preceded by </Th> <Td> Allan MacNab </Td> </Tr> <Tr> <Th> Succeeded by </Th> <Td> George Brown </Td> </Tr> <Tr> <Td_colspan="2"> In office 6 August 1858--24 May 1862 </Td> </Tr> <Tr> <Th> Monarch </Th> <Td> Victoria </Td> </Tr> <Tr> <Th> Preceded by </Th> <Td> George Brown </Td> </Tr> <Tr> <Th> Succeeded by </Th> <Td> John Sandfield Macdonald </Td> </Tr> <Tr> <Td_colspan="2"> In office 30 May 1864--30 June 1867 </Td> </Tr> <Tr> <Th> Monarch </Th> <Td> Victoria </Td> </Tr> <Tr> <Th> Preceded by </Th> <Td> John Sandfield Macdonald </Td> </Tr> <Tr> <Th> Succeeded by </Th> <Td> John Sandfield Macdonald (as Premier of Ontario) </Td> </Tr> <Tr> <Td_colspan="2"> </Td> </Tr> <Tr> <Th_colspan="2"> Personal details </Th> </Tr> <Tr> <Th> </Th> <Td> John Alexander Macdonald 10 or 11 January 1815 Glasgow, Lanarkshire, Scotland </Td> </Tr> <Tr> <Th> </Th> <Td> 6 June 1891 (1891 - 06 - 06) (aged 76) Ottawa, Ontario, Canada </Td> </Tr> <Tr> <Th> Cause of death </Th> <Td> Stroke </Td> </Tr> <Tr> <Th> Resting place </Th> <Td> Cataraqui Cemetery </Td> </Tr> <Tr> <Th> Political party </Th> <Td> Conservative </Td> </Tr> <Tr> <Th> Other political affiliations </Th> <Td> Upper Canada Tory (1843--1867) Great Coalition (1864--1867) Liberal - Conservative (1867--1873) </Td> </Tr> <Tr> <Th> Spouse (s) </Th> <Td> Isabella Clark (m . 1843; d . 1857) Agnes Bernard (m . 1867) </Td> </Tr> <Tr> <Th> Children </Th> <Td> 3 (including Hugh John Macdonald) </Td> </Tr> <Tr> <Th> Education </Th> <Td> Apprenticeship </Td> </Tr> <Tr> <Th> Profession </Th> <Td> Lawyer </Td> </Tr> <Tr> <Th> Signature </Th> <Td> </Td> </Tr> <Tr> <Th_colspan="2"> Military service </Th> </Tr> <Tr> <Th> Nickname (s) </Th> <Td> "Old Tomorrow" "The Old Chieftain" </Td> </Tr> <Tr> <Th> Allegiance </Th> <Td> British Empire / Upper Canada </Td> </Tr> <Tr> <Th> Service / branch </Th> <Td> Loyalist militia </Td> </Tr> <Tr> <Th> Years of service </Th> <Td> 1837 </Td> </Tr> <Tr> <Th> Rank </Th> <Td> Private </Td> </Tr> <Tr> <Th> Battles / wars </Th> <Td> <P> Rebellions of 1837--1838 </P> <Ul> <Li> Upper Canada Rebellion </Li> </Ul> </Td> </Tr> <Tr> <Td_colspan="2"> Father of Confederation Cabinet offices held (show) <Ul> <Li> Attorney General of Canada West (1854--1862, 1864--1867) </Li> <Li> Minister of Militia and Defence (1860--1867) </Li> <Li> Minister of Justice and Attorney General of Canada (1867--1873) </Li> <Li> Minister of the Interior (1878--1883, 1888) </Li> <Li> Superintendent - General of Indian Affairs (1878--1887, 1888) </Li> <Li> President of the Privy Council (1883--1889) </Li> <Li> Minister of Railways and Canals (1889--1891) </Li> </Ul> Leadership offices held (show) <Ul> <Li> Leader of the Conservative Party of Upper Canada (1858--1867) </Li> <Li> Leader of the Conservative Party of Canada (1867--1891) </Li> <Li> Leader of Her Majesty's Loyal Opposition (1873--1878) </Li> </Ul> Parliamentary offices held (show) <Ul> <Li> Member of the Parliament of the Province of Canada (1843--1867) </Li> <Li> Member of the Canadian Parliament for Kingston (1867--1878, 1887--1891) </Li> <Li> Member of the Canadian Parliament for Marquette (1878) </Li> <Li> Member of the Canadian Parliament for Victoria (1878--1882) </Li> <Li> Member of the Canadian Parliament for Lennox (1882) </Li> <Li> Member of the Canadian Parliament for Carleton (1882--1887) </Li> </Ul> </Td> </Tr> </Table> <Tr> <Th_colspan="2"> The Right Honourable Sir John Alexander Macdonald PC GCB KCMG QC </Th> </Tr>

When was the first prime minister of canada elected
find me the text answering this question