background image
<< CURRENT_USER function | FLOOR function >>

DAY function

<< CURRENT_USER function | FLOOR function >>
Derby Reference Manual
127
DAY function
The DAY function returns the day part of a value.
The argument must be a date, timestamp, or a valid character string representation of
a date or timestamp that is not a CLOB, LONG VARCHAR, or XML value. The result of
the function is an integer between 1 and 31. If the argument can be null, the result can be
null; if the argument is null, the result is the null value.
Syntax
DAY ( expression )
Example
values day('2007-08-02');
The resulting value is 2.
DEGREES function
The DEGREES function converts a specified number from radians to degrees.
The specified number is an angle measured in radians, which is converted to an
approximately equivalent angle measured in degrees. The specified number must be a
DOUBLE PRECISION
number.
Attention: The conversion from radians to degrees is not exact. You should not expect
DEGREES(ACOS(0.5)) to return exactly 60.0.
The data type of the returned value is a DOUBLE PRECISION number.
Syntax
DEGREES ( number )
DOUBLE function
The DOUBLE function returns a floating-point number corresponding to a:
· number if the argument is a numeric expression.
· character string representation of a number if the argument is a string expression.
Numeric to double
DOUBLE [PRECISION] (NumericExpression )
NumericExpression
The argument is an expression that returns a value of any built-in numeric data type.
The result of the function is a double-precision floating-point number. If the argument
can be null, the result can be null; if the argument is null, the result is the null value.
The result is the same number that would occur if the argument were assigned to a
double-precision floating-point column or variable.
Character string to double
DOUBLE (StringExpression )
StringExpression
The argument can be of type CHAR or VARCHAR in the form of a numeric constant.
Leading and trailing blanks in argument are ignored.