MySQL Datediff (Date Difference Calculation)
565

To calculate numbers of days between two colums, MySQL has Datediff function for calculation between two dates.

Example Usage:

SELECT DATEDIFF (NOW (), date) as ExampleDate FROM Calendar;


This query will check Today's Date by Now() function of MySQL and calculate days from "Example" date until today.

Datediff Usage is not well-known by communities and many people are doing these calculations with additional requirements. 

Using this query can save "PHP" side codings by solving them on "Query Stage" without requiring to be proceed from raw.

If you are looking for consultation, fill the Contact Form below.
The scientific man does not aim at an immediate result. He does not expect that his advanced ideas will be readily taken up. His work is like that of the planter — for the future. Nikola Tesla
Haluk YAMANER - Personal
Contact Form
You must complete Security Verification to submit your form.