Mysql - Syntax to find difference between two dates, How to find diff between two given dates

Syntax to find difference between two dates

To find the different between two given dates in months:

period_diff is a mysql function which is used to find the difference between two given dates. This will help to find the difference between any given dates.

Use PeriodDiff mysql function
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_period-diff

Example:
 select period_diff(date_format(date1row, '%Y%m'), 
 date_format(date2row, '%Y%m')) as months from your_table;  

The topic on Mysql - Syntax to find difference between two dates is posted by - Math

Hope you have enjoyed, Mysql - Syntax to find difference between two datesThanks for your time

Tech Bluff