Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
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);