When the cravings arrive, which they inevitably will, it's good to distract yourself with an alternative sweetness. Often sugar is simply a treat or a reward, so plan out activities that can take the place of the comfort you draw from sugar. If you're at work and feel like a snack, get up, make a cup of green tea, stretch your legs and get a breath of fresh air.
If you're feeling sluggish mid afternoon, take a bracing walk.
If you fancy something sweet after dinner, try cheese or have a bath and read a book.
And if you do lapse, don't stress and give up. It's ok, just keep your good intentions on track and turn the page. The more you practice self-control the more it becomes second nature.