FROM_DAYS()

Overview

Returns the DATE for a day number based on the Gregorian calendar.

USAGE

FROM_DAYS(day_num)

Argument Name

Description

day_num

The Gregorian day number

DETAILS

FROM_DAYS() is a date-time function that returns a DATE value from a given a day number on the Gregorian calendar.

The date 0001-01-01 is the Gregorian day 366. Lower day numbers return the invalid date 0000-00-00.

The actual start of the Gregorian calendar is day 1582.

A NULL is returned if the argument is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT FROM_DAYS(736000);
+-------------------+
| FROM_DAYS(736000) |
+-------------------+
| 2015-02-06        |
+-------------------+
SELECT FROM_DAYS(366);
+----------------+
| FROM_DAYS(366) |
+----------------+
| 0001-01-01     |
+----------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES