Generates time values from three inputs of Integer type: hour, minute, and second. |
Integer literal values:
dateformat(time(23,58,59),'HH mm ss') |
Output: Returns the following map:
23 58 59 |
Column reference values:
dateformat(time(myHour, myMinute, mySecond), 'hh-mm-ss') |
Output: Generates a column of values where:
hh
= values from myHour
columnmm
= values from myMinute
columnss
= values from mySecond
columndateformat(time(hour_integer_col,minute_integer_col,second_integer_col ),'time_format_string') |
Argument | Required? | Data Type | Description |
---|---|---|---|
hour_integer_col | Y | integer | Name of column or Integer literal representing the hour value to apply to the function |
minute_integer_col | Y | integer | Name of column or Integer literal representing the minute value to apply to the function |
second_integer_col | Y | integer | Name of column or Integer literal representing the second value to apply to the function |
time_format_string | Y | string | String literal identifying the time format to apply to the value |
Integer literal or name of the column containing integer values for the hour. Values must integers between 0 and 23, inclusive.
Required? | Data Type | Example Value |
---|---|---|
Yes | Integer (literal or column reference) | 15 |
Integer literal or name of the column containing integer values for the minutes. Values must integers between 0 and 59, inclusive.
Required? | Data Type | Example Value |
---|---|---|
Yes | Integer (literal or column reference) | 23 |
Integer literal or name of the column containing integer values for the second. Values must integers between 0 and 59, inclusive.
Required? | Data Type | Example Value |
---|---|---|
Yes | Integer (literal or column reference) | 45 |
For more information, see DATEFORMAT Function.