Example:
XYZ Corp pays a $0.25/share dividend - Ex date=1/15/13, Pay date 1/31/2013
I own 100 total shares of XYZ on 1/1/2013
I buy 50 shares of XYZ on at 12 PM 1/15/2013 (increasing total shares to 150)
I buy 50 more shares of XYZ at 1 PM on 1/15/2013 (increasing total shares to 200)
I dispose of all 200 shares of XYZ at 4PM on 1/15/2013 (decreasing total shares to 0)
On 1/31/2013, what is my dividend payment worth?
25.00 (using balance of 100 on start of ex date:1/15/2013)
37.50 / 50.00 (using balances of 150 and 200 during ex date:1/15/2013)
Nothing (because I didn't own it at the end of ex date: 1/15/2013)
Something else entirely