Depends what species they are. There are several possibilities, but if you're talking about the Large White Butterfly, for instance, there are two generations a year, with eggs laid in May and July. They hatch in about a week, then pupate after about a month. So they'll be gone in another month at most.