How to calculate months difference between two dates mysql

by Jayanthi 2013-09-30 19:35:54

calculate months difference between two dates mysql



SELECT 12 * ( YEAR( '2014-09-30' ) - YEAR( '2012-10-30' ) ) + ( MONTH( '2014-09-30' ) - MONTH( '2012-10-30' ) ) AS months FROM dual


This query returns how many months

23 months




553
like
0
dislike
0
mail
flag

You must LOGIN to add comments