He was around for a lot longer than a day -- remember that Dayton's novel establishes that Kodos had been working his wiles on the colony's government for weeks or even months prior to the catastrophe (the book mentions that he'd arrived some time earlier from Earth), and by that point had amassed many, many supporters on the council and even on Governor Ribiero's own staff. When he finally made his move, he had all the pieces in place that he needed.