Time. I'm sure you knew about your court date well in advance, with at least enough time to get clean. Depending on how often you smoke, you may need to get a "detox" drink to mask the THC in your urine.
I wouldnt quote me on this, but I was a heavy smoker and quit for a month to join the army. The day before my test I took a home one and failed it. My recruiter told me to drink a gallon of water the night of, take niacin, and drink another the day of the test. It worked for me lol.
There is a product out there. I can't remember what it is called, and I hear it is pretty expensive, but it is supposed to remove THC from your system in 2 days. I've heard it works, but you'll have to google it or something. Sorry, I guess i wasn't too helpful. ps, piss test = get over yourself and quit for a bit. It's not the end of the world.
ive stop smokin since ive heard about the test,its been about two weeks already and the test is next wednesday . i have been drinkn a shit load of water ,but i want to make sure that ill pass
go to gnc and ask them for the drink that cleans your system and take some vitamin b after because ur piss will be clear. the vitamins will darken the piss up which will help u pass