Obama was sworn in as a U.S. Senator on January 4, 2005. So, as of today's date (September 2, 2008), he has been a US Senator for about 3 years 8 months. He was a state senator in Illinois for 2 terms (8 years). He was elected as a Democrat to the U.S. Senate in 2004, and served from January 3, 2005, to November 16, 2008, when he resigned from office, having been elected president. Looks like three years.