FROM_DAYS
FROM_DAYS is a MySQL function used to convert a given number of days from the year 0 AD into a date format. The result typically displays in the 'YYYY-MM-DD' format.
FROM_DAYS(N)
- n: This parameter denotes the number of days passed since year zero in the Gregorian calendar. It is an integer value which is used to calculate and return a date.
Example
Output
Explanation
The FROM_DAYS
function in MySQL converts the given day number to a date. In this example, day number 736881 is converted to the corresponding date ‘2019-12-31’.