it really depends on you man, if you let them pre flwer as root says than it can take up to ten weeks depending on strain, as the plants mature they will tell what sex they are through preflowers they are located at the node of each branch site up the main stalk. you can however put them into flower before they are preflowering. you just flip from 18/6 or whatever you are running straight to 12 / 12 and after a couple weeks they wi ll tell you what sex they are, males may show themselves much earlier than females though so be on the lookout for em.
also you may consider keeping your males and not flowering them or pulling them out of flower and putting them under 24 hours of light again, this way if you ever want to make seeds you have some males to pick from from the set of seeds you purchased. when you buy new seeds they may be refined or not the same as what you had originally purchased. just some food for thought though.
wetone