How do you evolve main Pokemon in time?

You have to finish the WHOLE game even after the credits, and recruit dailga and palkia.