Syntax
integer (expression)
Description
The integer function returns expression converted to an integer.
Table 6-5: integer function
Data Type
Conversion
boolean If expression is true, the result is 1; otherwise the result is 0.
character string Expression is converted to an integer with the default formatting set. See Chapter 13,
Formatting Data Values for information about default formatting sets. If the string cannot be converted to an
integer, the result is 0.
date The result is one plus the number of days between expression and January 1, 1800.
integer No conversion required.
long No conversion required.
money Expression is converted to an integer by truncating any fractional part of the basic currency units
(pennies in the U.S.).
real Expression is converted to an integer by truncating any fractional part.
time The result is one plus the number of seconds between expression and midnight.
Example
integer ("1234.5")