The x-date is 2 business days before the date of record. With KMP's next date of record being on Thursday 4-30, the x-div date (or x-dist. date for an MLP) would be Tuesday 4-28.
To be clear: the x-div date is the first day a stock or unit is trading without the right to the dividend/distribution. So you must purchase 3 days before the date of record in order to be the owner of record on the date-of-record. So you must buy KMP or KMR on or before 4-27 to receive the dist/dividend.
And to be clear on which ten day average is used: the following is from the KMR prospectus:
"Each quarter we will calculate the fraction of a share to be distributed per outstanding share by dividing the quarterly cash distribution to be made by Kinder Morgan Energy Partners, L.P. on each common unit by the average market price of a share over the ten consecutive trading days preceding the date on which the shares begin to trade ex-dividend under the rules of the principal exchange on which they may be listed. "