Anecdata: I've stopped drinking alcohol (3 years), and I've stopped smoking (~10 years), but giving up candy, sweet pastry, or anything that's got significant refined sugar in was too much. I managed it for six months, and then broke down, then three months, and really I haven't tried again.
Interestingly, when I came at it from a slightly different angle ("mindful eating") and allowed myself as much of anything I wanted eaten mindfully, my natural desire tapered off, and I eat a lot less sweet stuff these days.
Interestingly, when I came at it from a slightly different angle ("mindful eating") and allowed myself as much of anything I wanted eaten mindfully, my natural desire tapered off, and I eat a lot less sweet stuff these days.