Generates a date value from three inputs of Integer type: year, month, and day. |
DATEFORMAT
, as arguments. See the example below.Integer literal values:
derive type:single value: DATEFORMAT(DATE(2015,02,15),'yyyy-MM-dd') |
Output: Generates a column of values containing the formatted date value: 2015-02-15
.
Column reference values:
derive type:single value: DATEFORMAT(DATE(myYear, myMonth, myDay),'MMM yyyy') |
Output: Generates a column of date values where:
MMM
= short value for myMonth
yyyy
= value from myYear
derive type:single value:DATEFORMAT(DATE(year_integer_col,month_integer_col,day_Integer_col ),'date_format_string') |
Argument | Required? | Data Type | Description |
---|---|---|---|
year_integer_col | Y | integer | Name of column or Integer literal representing the year value to apply to the function |
month_integer_col | Y | integer | Name of column or Integer literal representing the month value to apply to the function |
day_integer_col | Y | integer | Name of column or Integer literal representing the day value to apply to the function |
date_format_string | Y | string | String literal identifying the date format to apply to the value |
Integer literal or name of the column containing integer values for the year.
Required? | Data Type | Example Value |
---|---|---|
Yes | Integer (literal or column reference) | 2015 |
Integer literal or name of the column containing integer values for the month.
1
or more, with a maximum value of 12
.
Required? | Data Type | Example Value |
---|---|---|
Yes | Integer (literal or column reference) | 4 |
Integer literal or name of the column containing integer values for the day.
1
or more, with a maximum value for any month of 31
.
Required? | Data Type | Example Value |
---|---|---|
Yes | Integer (literal or column reference) | 26 |
For more information on supported data formatting strings, see Supported Data Types.
For more information, see DATEFORMAT Function.