This MySQL tutorial explains how to use the MySQL FROM_DAYS function with syntax and examples.
Description
The MySQL FROM_DAYS function takes a numeric representation of the day and returns a date value.
Syntax
The syntax for the FROM_DAYS function in MySQL is:
FROM_DAYS( numeric_day )
Parameters or Arguments
numeric_day
The numeric day to convert to a date.
Note
- The FROM_DAYS function is to be used only with dates within the Gregorian calendar.
- See also the
This MySQL tutorial explains how to use the MySQL FROM_DAYS function with syntax and examples.
Description
The FROM_DAYS function takes a numeric representation of the day and returns a date value.
Syntax
The syntax for the FROM_DAYS function is:
FROM_DAYS( numeric_day )
Parameters or Arguments
numeric_day
The numeric day to convert to a date.
Note
- The FROM_DAYS function is to be used only with dates within the Gregorian calendar.
- See also the TO_DAYS function which is the reverse of the FROM_DAYS function.
Applies To
The FROM_DAYS function can be used in the following versions :
- MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23
Example
Let’s look at some FROM_DAYS function examples and explore how to use the FROM_DAYS function.
For example:
mysql> SELECT FROM_DAYS(736038); Result: 2015-03-16 mysql> SELECT FROM_DAYS(736039); Result: 2015-03-17 mysql> SELECT FROM_DAYS(736040); Result: 2015-03-18
- which is the reverse of the FROM_DAYS function.
Applies To
The FROM_DAYS function can be used in the following versions :
- MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23
Example
Let’s look at some FROM_DAYS function examples and explore how to use the FROM_DAYS function.
For example:
mysql> SELECT FROM_DAYS(736038); Result: 2015-03-16 mysql> SELECT FROM_DAYS(736039); Result: 2015-03-17 mysql> SELECT FROM_DAYS(736040); Result: 2015-03-18
Next Topic : Click Here
Pingback: MySQL: EXTRACT Function | Adglob Infosystem Pvt Ltd