In MySQL, you can use the TO_DAYS()
function to find out how many days have passed since day 0 for a particular date. For example, you can pass today’s date to this function, and it will return how many days it’s been since day 0.
This article contains examples to demonstrate.