As correctly pointed out above, the only reason people ask the question is clearly because they are taking drugs.
The armed forces are not naive enough to believe that we only recruit those that have never experimented with drugs, however don't ever believe the advice of those that state a timescale in order to pass a drugs test.
The issue is the individual's attitude to drugs. If you are a habitual user, then forget it- get a job where you are not relied upon, because we cannot afford to employ wasters who are willing to compromise the safety of their colleagues.
If you've kicked it into touch for well over six months and convince yourself that you really want to do a job that doesn't tolerate drugs, then maybe it's worth entering the selection process IF you agree with the zero tolerance policy. ALL recruits are drugs tested and, once trained, will continue to undergo random tests which result in immediate dismissal if found positive.