After David defeated the Amalekites, he went back to Ziklag. This was just after Saul had been killed. David had been there two days.