A few months to years can pass while having erectile dysfunction (ED). You might have ED for the rest of your life, depending on the underlying cause. The Diagnostic and Statistical Manual of Mental Disorders, Fifth Edition (DSM V), states that for erectile dysfunction (ED) to be diagnosed, it must last for at least six months.