A good rule of thumb is to store cooked vegetables for 3-5 days. Only pickled goods can survive for two months if homemade and 12 months if store-bought. Never keep vegetables past their expiration date as the risk of foodborne illness increases with time.