In Access, the Int function returns the integer portion of a number.
The syntax for the Int function is:
Int ( number )
The argument number can be any valid numeric expression. The Int function removes the fractional part of number and return the resulting integer value. The data type of the return value is the same as that of the number argument. If number is negative, Int returns the first negative integer less than or equal to number. If number is a string that can be converted to a number, the return type will be a double. If the numeric expression results in a Null, Int return a Null.
Examples
|
VBA Code
|
This example uses the Int function to return the integer portion of a number. Now the MyNumber variable would contain the value 15.
SQL query
You can also use the Int function in a query.
|