I get a weed in the garden called Lady's Thumb (Polygonum persicaria) that looks similar, but it might not be what you have. According to a flower book, and your description so far, it sounds more like some kind of Smartweed (Polygonum ?).
If you want to know what species of Smartweed it is, I will need more info to narrow it down further between potentially 3 species that I am able to look up.
What months do they definitely flower?
How long are the flower clusters along the stem?
What lengths are the leaves?
Does it grow in moist soil or is it more like a swamp?