ID EN
Date and Time Functions

FROM_DAYS(N)

MySQL 8.4

Given a day number N, returns a DATE value. Returns NULL if N is NULL.

Syntax

MYSQL
SELECT FROM_DAYS(730669);
'2000-07-03'

Examples

Example

Use FROM_DAYS() with caution on old dates. It is not intended for use with values that precede the advent of the Gregorian calendar (1582). See Section 13.2.7, “What Calendar Is Used By MySQL?”.

MYSQL
SELECT FROM_DAYS(730669);
'2000-07-03'