If I am obese, how long should I walk on the tredmill everyday to lose weight?

Exercise. You should walk at least half hour daily on the treadmill, longer if possible. You need to cut your calorie intake also. Some folks find that going down to 500 cal a day for two days a week helps move weight loss along.