SQL Reference

Chapter 2 | Supported standards 33
Functions that return dates
Note The DATE() function is deprecated. Use the SQL standard CURRENT_DATE instead.
SIGN An indicator of the sign of the argument: -1 for
negative, 0 for 0, and 1 for positive
SIN Returns the sine of the argument
SQRT Returns the square root of the argument
TAN Returns the tangent of the argument
YEAR Returns the year part of a date YEAR(DATE '2019-01-30') returns
2019
Functions that
return dates Description Example
CURDATE
CURRENT_DATE
Returns today’s date
CURTIME
CURRENT_TIME
Returns the current time
CURTIMESTAMP
CURRENT_TIMESTAMP
Returns the current timestamp value
TIMESTAMPVAL Converts a character string to a
timestamp
TIMESTAMPVAL('2019-01-30 14:00:00')
returns its timestamp value
DATE
TODAY
Returns today’s date If today is 11/21/2019, DATE() returns 2019-11-21
DATEVAL Converts a character string to a date DATEVAL('2019-01-30') returns 2019-01-30
Functions that
return numbers Description Example