You pay zakat when the zakat year has elapsed, irrespective of when particular portions of your wealth came into your possession. Even if the cash came into your possession a day before the zakat year had elapsed, you would have to pay zakat on it the following day.