Converts TIME data as PERIOD(TIME[(n)] [WITH TIME ZONE]) or PERIOD(TIMESTAMP[(n)][WITH TIME ZONE]).
ANSI Compliance
This statement is ANSI SQL:2011 compliant.
As an extension to ANSI, CAST permits the use of data attribute phrases.
Syntax
CAST ( time_expression AS period_data_type [ data_attribute [...] ] )
Syntax Elements
- time_expression
The TIME expression to be converted.
- period_data_type
The data type to which the expression is to be converted.
- data_attribute
- One of the following data attributes:
- FORMAT
- NAMED
- TITLE