Generates a date value from three inputs of Integer type: year, month, and day.

Integer literal values:

dateformat(date(2015,02,15),'yyyy-MM-dd')

Output: Returns the formatted date value: 2015-02-15.

Column reference values:

dateformat(date(myYear, myMonth, myDay),'MMM yyyy')

Output: Returns date values based on three columns, formatted for date.


dateformat(date(year_integer_col,month_integer_col,day_Integer_col ),'date_format_string')


ArgumentRequired?Data TypeDescription
year_integer_colYintegerName of column or Integer literal representing the year value to apply to the function
month_integer_colYintegerName of column or Integer literal representing the month value to apply to the function
day_integer_colYintegerName of column or Integer literal representing the day value to apply to the function
date_format_stringYstringString literal identifying the date format to apply to the value

year_integer_col

Integer literal or name of the column containing integer values for the year.

 

Required?Data TypeExample Value
YesInteger (literal or column reference)2015

month_integer_col

Integer literal or name of the column containing integer values for the month.

Required?Data TypeExample Value
YesInteger (literal or column reference)4

day_integer_col

Integer literal or name of the column containing integer values for the day.

Required?Data TypeExample Value
YesInteger (literal or column reference)26

date_format_string

For more information on supported data formatting strings, see Supported Data Types.

For more information, see DATEFORMAT Function.

Example - date and time functions