If you need to change your trial date, you should make the request before the trial date by filing a Motion for Continuance along with the necessary fee to file the motion (usually $40). You can also reach an agreement with the other side (i.e. a stipulation) to continue the trial date and file that with the court so the judge can automatically grant the request to change the trial date. Don't wait until the trial date to make the request. Include your request to get legal counsel in your Motiont for Continuance.
Assuming that you are facing an unlawful detainer action (e.g., eviction for not paying rent), the process is accelerated. You may encounter resistance when trying to get a "continuance."
The easiest way is to reach an agreement with the other side (a "stipulation"). If you are fortunate to get the stipulation, it MUST be filed and approved by the court or it is not something that you can rely on. If you reach a stipulation but do not file the stipulation, you could be stuck with the original date.
If your opponent refuses to agree to the delay, you need to convince the court, over the opponent's objection, that you should be granted a continuance. You will need a great reason, not just a good reason. So if you do not get a stipulation, then you will need to file a motion for a continuance.
As for seeking legal advice, you do not have much time. You cannot wait until the very day of trial to say that you are going to start looking for a lawyer. If you can show the judge that you tried looking for a lawyer, then you may be able to convince the judge to allow you SOME time to obtain a lawyer.
The best thing to do is to prepare well in advance.
Seek self-help at http://www.courtinfo.ca.gov/selfhelp/other/landten.htm and http://www.occourts.org/directory/family/self-help.html .