TO_DAYS()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the number of days since year 0 for a given date.
USAGE
TO_DAYS(date)
Argument Name | Description |
---|---|
| The |
DETAILS
TO_DAYS()
is a date-time function that returns the number of days since year 0 for the given date argument.
A NULL
is returned if the argument is NULL
.
EXAMPLES
SELECT TO_DAYS('2020-01-02');
+-----------------------+
| TO_DAYS('2020-01-02') |
+-----------------------+
| 737791 |
+-----------------------+