Home page
 
 Home 
 ASP 
 PHP 
 SQL 
 HTML 
 JavaScript 
 Search 
 Contact 
 
Search
or browse popular tags
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

Access: Cos Function

Print

In Access, the Cos function returns a double containing the cosine of an angle.

The syntax for the Cos function is:

Cos ( number )

The argument number can be any valid numeric expression that expresses an angle in radians. The Cos function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse.

Cos(15)    returns -0,759687912858821
Cos (2)    returns -0,416146836547142

VBA Code

Dim MyNumber
MyNumber = Cos(2.5)

This example uses the Cos function to return the cosine of an angle. Now the MyNumber variable would contain the value -0.80708818.

SQL query

You can also use the Cos function in a query.

SELECT Cos([OwnerId]) AS Expr1
FROM Orders


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




Tags:

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

  • Comments





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