MySQL Datediff (Date Difference Calculation)
255

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.
My biggest mistake is probably weighing too much on someone's talent and not someone's personality. I think it matters whether someone has a good heart. Elon Musk
Haluk YAMANER - Personal
Contact Form
You must complete Security Verification to submit your form.