ODBC and JDBC Guide

Table Of Contents
Chapter 7 | Supported standards 53
Functions that return dates
Note The DATE() function is deprecated. Use the SQL standard CURRENT_DATE instead.
LN
LOG
Returns the natural logarithm of the argument
MAX Returns the larger of two numbers MAX(66,89) returns 89
MIN Returns the smaller of two numbers MIN(66,89) returns 66
MINUTE Returns the minute part of a value
NUMVAL Converts a character string to a number; if the
character string is not a valid number, returns 0
NUMVAL('123') returns 123
PI Returns the constant value of the mathematical
constant pi
RADIANS Returns the number of radians for an argument that is
expressed in degrees
ROUND Rounds a number ROUND(123.456,0) returns 123
ROUND(123.456,2) returns 123.46
ROUND(123.456,-2) returns 100
SECOND Returns the seconds part of a value
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
VAL Converts a character string to a number; if the
character string is not a valid number, returns 0
VAL('123') returns 123
X Returns the decimal equivalent of a hexadecimal
number
X'b9' returns 185
YEAR Returns the year part of a date YEAR({d '2012/01/30'}) returns
2012
Functions that return
dates Description Example
CURDATE
CURRENT_DATE
Returns today’s date
CURTIME
CURRENT_TIME
Returns the current time
CURTIMESTAMP
CURRENT_TIMESTAMP
TIMESTAMPVAL
Returns the current timestamp value
DATE
TODAY
Returns today’s date If today is 11/21/2012, DATE() returns 2012-11-21
DATEVAL Converts a character string to a date DATEVAL({01/30/2012}) returns 2012-01-30
Functions that
return numbers Description Example