Extraction (extraction_function)
An extraction (extraction_function
) is a function that extracts parts of a date, time or time stamp value or that calculates a date, time or time stamp value.
Syntax
<extraction_function> ::=
DATE(<expression>)
| DAY(<date_or_timestamp_expression>)
| HOUR(<time_or_timestamp_expression>)
| MICROSECOND(<expression>)
| MINUTE(<time_or_timestamp_expression>)
| MONTH(<date_or_timestamp_expression>)
| SECOND(<time_or_timestamp_expression>)
| TIME(<expression>)
| TIMESTAMP(<expression>[,<expression>])
| YEAR(<date_or_timestamp_expression>)
<date_or_timestamp_expression ::=
<expression>
<time_or_timestamp_expression> ::=
<expression>SQL Tutorial, Date and Time Calculations
When used in a function, the argument date_or_timestamp_expression
must supply a date, time stamp or alphanumeric value that matches the current date or time stamp format. When used in a function, the argument time_or_timestamp_expression must supply a time, time stamp or alphanumeric value that matches the current time or time stamp format. Date and time values are available in a variety of date and time formats (ISO, USA, EUR, JIS, INTERNAL
)