I too used to overeat sweets at the end of the workday but before dinner, esp. if I had to work late. However, two years ago I resolved to eat sweets only on the weekends. I've got that down most of the time. When I was first learning the habit, I would always have something really good planned as part of my dinner (still do), something like a special bread or fresh biscuit with butter or cheese-- not a lot, just enough. I found that thinking about that food coming up and how much I was going to enjoy my meal if I didn't ruin my appetite helped a lot. It's surprising now how few days a month (or even longer) it is even a hint of a problem now. It was just a habit to break, and certainly not a reflection of my whole life, as I often let myself think it was. That gave it too much power!