Use forum search: Ex Dividend Date? - #2 by Etypsyno
You have to own the stock before ex-date, and hold through the night to ex-date then you’ll receive your dividend on (or couple days later) payment date.
There is no minimum requirement for ownership span, you could do that it’s called dividend capture and is a strategy proven to lose you money. It’s a loss-making strategy as the dividend itself doesn’t magically create money and you pay taxes + spreads + whatever broker costs (on T212 that would be FX fee) while not really being in the market other than afterhour on the day before exdate and pre market on ex date