when can you detect the gender if its a boy?

Love me
Im kind of sad because my husband wants a boy.. I have no preference at all but i have a thing for having a girl ...