mysql get number of months between two dates code example Example: mysql get date diff in months SELECT TIMESTAMPDIFF(MONTH, '2012-05-05', '2012-06-15')