попробуйте что-то вроде этого:
SET @start = '2013-03-31';
SET @end = '2013-04-30';
-- date @start is last day of month ?
SET @start_last = @start = LAST_DAY(@start);
-- date @end is last day of month ?
SET @end_last = @end = LAST_DAY(@end);
-- checking if difference is more than month
SET @month_or_more =IF(@start_last AND @end_last OR DAY(@start) = DAY(@end), DATE_ADD(@start, INTERVAL 1 MONTH) <= @end, DATE_ADD(@start, INTERVAL 1 MONTH) < @end);
-- diff in months
SET @m_num = IF(@month_or_more, PERIOD_DIFF( DATE_FORMAT(@end, '%Y%m'), DATE_FORMAT(@start, '%Y%m')), 0);
-- diff in days
SET @d_num = DATEDIFF(DATE_ADD(@start, INTERVAL @m_num MONTH), @end);
SELECT ABS(@m_num) as month, ABS(@d_num) as days;
// РЕДАКТИРОВАТЬ фиксированная версия