Home page
 
 Home 
 ASP 
 PHP 
 SQL 
 HTML 
 JavaScript 
 Search 
 Contact 
 


Search
or browse popular tags
Got questions?

We got answers.

Ask your question about PHP, ASP, Javascript, HTML, CSS, hosting and get professional help, free of charge.

Access Functions
Subscription

Sign up for the free email newsletter for new tips, tutorials and more. Enter your email address below, and then click the button.

Privacy Policy

RSS Twitter

Home / SQL / Access Functions

 

 

Access: Int Function

Print Bookmark and Share

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

Int (2.45)       returns 2
Int (3.78)       returns 3
Int (-4.89)      returns -5

VBA Code

Dim MyNumber
MyNumber = Int(15.48)

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.

SELECT Int([BuyerId]) AS Expr1
FROM Antiques


If you'd like to see how it works, enter SQL statement and press Execute
 

Need help with ASP, PHP, Javascript?

Let our experts help you.
 
 
ASPRunner Professional - Web Developer's Nirvana
Web hosting from $5/month (PHP,ASP,MySQL,unlimited emails)



Tags: ACCESS FUNCTION INT INTEGER NUMBER

Add To: Add to dzone dzone | Digg this digg | Add to del.icio.us del.icio.us | Stumble it stumbleupon

  • Comments





Copyright © 2005-2009             www.WebCheatSheet.com All Rights Reserved.