VeloDB Cloud
SQL Manual
Functions
date-time-functions
to_days

to_days

Description

Syntax:

INT TO DAYS

This function returns the number of days between 0000-01-01 and the given date.

The parameter is of DATE or DATETIME type.

Example

mysql> select to_days('2007-10-07');
+-----------------------+
| to_days('2007-10-07') |
+-----------------------+
|                733321 |
+-----------------------+

Keywords

TO_DAYS,TO,DAYS