How long could you take diazepam (valium) before the drug is useless?

I don't understand? I'm not really understanding your question, since valium is not "useless." the basic drug has a 30-60 hour half-life, and it has psychoactive breakdown products . This is one of the problems with it, especially in older people: it can build up and create longer-lasting sedation & cognitive issues than expected or desired. Tolerance can happen -- habituation, addiction, & withdrawal syndrome too.
Valium. I believe u meant before developing tolerance & valium stops working. That varies with the dosage and the length of time u have been taking it.
Use on as needed . Valium and benzodiazapine medication r intended to be taken on as needed basis , if u take them on regular basis u will get used to it and it will stop working and u find u self increasing the dose and getting addicted .
Longer than U think. If taken orally (as most people do) it takes the average young healthy person about a day to get rid of half the drug they took. This metabolism is prolonged further with use of alcohol. So best advice.... Several days would be a safe interval.