Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

FROM_DAYS

Example

Convert a numerical day representation into a date.

SELECT FROM_DAYS(685467);

Definition and Usage

The FROM_DAYS() function generates a date from a numeric date value.

The FROM_DAYS() function should only be used with dates that fall within the Gregorian calendar.

Note: This function serves as the inverse of the TO_DAYS() function.

Syntax

FROM_DAYS(number)

Parameter Values

Parameter

Description

number

Required: The numerical day to be converted into a date.

Technical Details

Works in:

 From MySQL version 4.0

More Examples

Example

Convert a numeric day representation into a date.

SELECT FROM_DAYS(780500);