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!

calculate hours

Status
Not open for further replies.

goobil

Technical User
Aug 9, 2003
38
AG
Hi all,

I am working on a payroll program and i am having problem with numbers like is i xtt = "1.5" and it round it to 2 in sted of 1.2
this is what i am doing

Dim xtt As Interger
Dim reghours As Interget
Dim xtotal As Interger
xtt = "1.5"
reghoure = "2.5"

xtotal = att * reghoure

when i debut it
xtt = 2
reghoure = 3
How can i fix this please

Kenneth
kennethg@act2000.net



 
don't use Integers (or Long). Use the single or double datatype. Integers are for "whole" numbers only and therefore round off any number you assign to them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top