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

MySQL MAKEDATE() Function

❮ MySQL Functions

Example

Return the date for a certain year and day-of-year value:

SELECT MAKEDATE(2017, 3);
Try it Yourself »

Definition and Usage

The MAKEDATE() function returns the date for a certain year and day-of-year value.

Syntax

MAKEDATE(year, day-of-year)

Parameter Values

Parameter Description
year Required. The (4-digit) year used to create the date
day-of-year Required. The day of the year used to create the date

Technical Details

Works in: MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1.1

More Examples

Example

Return the date for a certain year and day-of-year value:

SELECT MAKEDATE(2017, 175);
Try it Yourself »

Example

Return the date for a certain year and day-of-year value:

SELECT MAKEDATE(2017, 100);
Try it Yourself »

Example

Subtract 2 months to a date and return the date:

SELECT MAKEDATE(2017, 366);
Try it Yourself »

❮ MySQL Functions