It all depends on the severity of the situation and how well the medication is working, in addition to your diet. If you make sure to avoid any acidic foods (citrus & berry juices and fruits, garlic, coffee, carbonated drinks), as well as taking your medication as directed, you may be looking at at 6 week recovery time. Of course, only your doctor can determine whether this is sufficient.
Was there any reason given for the gastritis?