You need to have at least 15 days left on your current stamp when you apply, 21 days in a couple of places. Also as
@Brandon ***********
says a couple of places require the funds are in your bank for 2 months before you apply but most don't. Best thing is to go to your local immigration office when you arrive, get the 30 day extension and ask them what their requirements are.