You can use it up until the day your remaining balance on the old account is moved over, I believe.
When I switched I put enough to live on in the new account and just used that for the week of the switch.
One thing to watch out for with switching --sometimes the company you have a Direct Debit with will ignore the switch notification and expect you to set up the direct debit manually. I had that with O2 and some of my savings/investment providers.
Even though it may show up in your internet banking as moved over, it may be a zombie that’ll just sit there doing nothing. Best set your switch date to after your last bill has gone out, so you have time to setup anything that didn’t switch automatically.