On August 18. 1945 ; Sukarno takes office as the first president of Indonesia, following the country's declaration of independence the previous day.