The day the company looks at its share register and writes down who owns the stock, and those holders are the ones paid. It sits a couple of days after the ex-date because a Philippine trade takes two business days to settle, so a buy made on the ex-date has not reached the register in time. The ex-date is the one you act on; the record date is the company's own bookkeeping.
See every term in the full PSE investing glossary.