How long does a fruit and sugar mixture last?
It depends on a lot of factors: what you're describing isn't much different from making jam, and homemade jam is good for about a month, once you open it. Assuming you got the temp high enough to kill all the bacteria, the time will depend entirely on PH and water content. The more acidic, and the less watery the better.

Generally things like this freeze well though, so, when in doubt, throw it in the freezer.