I figured as much. But what effects, if any, would it have for it to be taken either during or after the Second Anglo-Dutch War?
I assume you mean, what effects if the Dutch recaptured it? Well, they did in fact take it again - in 1673 (druing the Third Anglo-Dutch War), which certainly satisfies your "after the Second Anglo-Dutch War" condition. And due to the reasons Ofaloaf already stated, at the war's conclusion in 1674 the Dutch were happy to "exchange" it for Suriname (which as a matter of fact they had already captured from the English in 1667).
The only way I can see the Dutch holding on to New Amsterdam is if the English had suffered even more humiliation in the Third Anglo-Dutch War. Although the Dutch are widely regarded to have emerged the victors, with the English suffering several significant blows to their prestige (amongst others their defeat in all four major naval battles of the war and of course their allowing the Dutch to recapture New Amsterdam), nevertheless the bargaining power of the Dutch was held in check somewhat because:
a) Although the Dutch had forced the crestfallen English out of the war, they still had to continue fighting France until 1678, so this was no time to start making excessive demands to the English.
b) Just two years previously, the Dutch had suffered their
Rampjaar ("disaster year") of 1672, when the Netherlands seemed to be on the brink of total annihilation due to the initially successful Anglo-French attack. Hence, the Dutch were probably mindful of how quickly things could change and how they shouldn't push things too far in the peace negotiations with the English.
However, if the Dutch victory had been more extensive, then it is very possible that the Dutch no longer say, "ok we will give you back New Amsterdam as long as we get to keep Suriname", but rather, "we get to keep both New Amsterdam and Suriname". And with the English even more desperate to get out of the war than in OTL, I doubt they'd put up much fuss.