The US president says military goals were nearly achieved but strikes on Iran could continue for two to three weeks.