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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does it has a Mid function for a decimal 3

Status
Not open for further replies.

RSX02

Programmer
May 15, 2003
467
CA
Hi
I would like to retrieve the second number beginning to the left of the point from a decimal .
For example
I have
14 895 - I would like to receive 9
37 258.14 - I would like to receive 5
Does it have any function that does that?
Thanks in advance
 
after this line:
temp = (chiffre * 10) Mod 100000000 - (((chiffre * 10) Mod 100000000) Mod 1)

temp should be an integer.

to get temp/10 to be an int you could do this:

temp = (temp/10) - ((temp/10) mod 1)

I think that should do it. But as usual, I haven't tested it.

-Rick

----------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top