Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there MOD like function in Access?

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
Hi,

I was wondering if Access has something like MOD function that calculates the module of the number. (e.g. 6.3 - mod is 0.3)

Thanks
 
The modulus operator (Mod) is used to divide two numbers and return only the remainder. Floating point numbers are rounded to integers.

8 Mod 3 returns 2
21 mod 7 returns 0
21.9 mod 7 returns 1

It appears that you want to return the decimal portion of a number. Use the following to perform this operation. x - fix(x)

x=6.3 : ?x - fix(x) returns 0.3 If you want to get the best answer for your question read faq183-874 and thread183-468158.
Terry L. Broadbent - DBA
SQL Server Page:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top