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

MAKEDATE

Example

Create and return a date using a specified year and a day-of-year value.

SELECT MAKEDATE(20173);

Definition and Usage

The MAKEDATE() function constructs and returns a date using a specified year and a day-of-year value.

Syntax

MAKEDATE(yearday)

Parameter Values

Parameter

Description

year

Mandatory: A four-digit year

date

Mandatory: A numeric value representing the day of the year

Technical Details

Works in:

 From MySQL version 4.0

More Examples

Example

Construct and return a date using a specified year and a day-of-year value.

SELECT MAKEDATE(2017175);

Example

Generate and return a date using a given year and a specific day-of-year value.

SELECT MAKEDATE(2017100);

Example

Formulate and provide a date using a specified year and a day count value.

SELECT MAKEDATE(2017366);