In MariaDB, TO_DAYS()
is a built-in date and time function that returns the number of days from the start of the standard calendar (0000-00-00), based on a given date.
You pass the date to the function when you call it.
The TO_DAYS()
function is the converse of the FROM_DAYS()
function.