Dreams from My Father: A Story of Race and Inheritance (1995) is a memoir by Barack Obama, who was elected as U.S. President in 2008. It explores events of his early years, up until his entry into law school in 1988. Obama published the memoir in July 1995, when he was starting his political campaign for Illinois Senate. He had been elected as the first African-American president of the Harvard Law Review in 1990. According to The New York Times, Obama modeled Dreams from My Father on Ralph Ellison's novel Invisible Man.

Answer this question based on the passage: when did obama write dreams from my father? Let's have some stream of consciousness first.
The important part for answering this question is: Dreams from My Father: A Story of Race and Inheritance (1995) is a memoir by Barack Obama, who was elected as U.S. President in 2008. So, the answer is 1995.