The amount of time you have to take legal action depends on the laws in your state. In some places, you may have as little as 180 days from the last incident to file a complaint. Others may allow more time.
The team at HarassmentHelp.org has experience handling instances of workplace sexual harassment across the country and is able to provide tailored guidence based on your location.