Complex sentence: He was an unsuccessful candidate for election in 1862 to the Thirty-eighth Congress, and was elected as a Republican to the Thirty-ninth Congress (March 4,1865--March 3,1867).
Split into simpler sentences: He was an unsuccessful candidate for election in 1862 to the Thirty-eighth Congress. Moulton was elected as a Republican to the Thirty-ninth Congress (March 4,1865-March 3,1867).