In 1958, Ojdanić studied at the Yugoslav military academy and graduated in 1964. He was deputy commander of the 37th Corps, with command in Užice. He was promoted to Major General on 20 April 1992 and he became the commander of Užice korpus. Under his command, the Užice Corps was deployed in military operations in eastern Bosnia during the war in Bosnia and Herzegovina.