Returns the year, month, day of month, hour, minute, and second field from any DateTime or Interval value, converting it to an exact numeric.
Syntax
{ YEAR | MONTH | DAYOFMONTH | HOUR | MINUTE | SECOND } ( expression )
- expression
- The expression that results in a DateTime, Interval, or UDT value.