If your doctor prescribed such drugs to you, I strongly suggest to follow his advise.
If you are taking the drugs on your own, I strongly advise not to take without doctor's prescription.
The duration time depends on your improvement. It is true that deanxit
cause stomach upset
, so, if you have noticed that your stomach has been unusually upset/burning/pain; can consult your doctor for other alternative.
All the best!