MySQL FROM_DAYS() Function
THE WORLD'S LARGEST WEB DEVELOPER SITE

MySQL FROM_DAYS() Function

❮ MySQL Functions

Example

Return a date from a numeric representation of the day:

SELECT FROM_DAYS(685467);
Try it Yourself »

Definition and Usage

The FROM_DAYS() function returns a date value from a numeric representation of the day.

The FROM_DAYS() function is to be used only with dates within the Gregorian calendar.

Note: The TO_DAYS() function is the reverse of the FROM_DAYS() function.

Syntax

FROM_DAYS(numeric_day)

Parameter Values

Parameter Description
numeric_day Required.  The numeric day to convert to a date

Technical Details

Works in: MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

More Examples

Example

Return a date from a numeric representation of the day:

SELECT FROM_DAYS(780500);
Try it Yourself »

❮ MySQL Functions