Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate 3 EZ Pay
Message
 
To
23/10/2008 10:33:33
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01356419
Message ID:
01356597
Views:
35
Hi Bruce,

Yes, this is what I ended up using:
Dim nConstant As Decimal
Dim nInput As Double
Dim nNewValue As Double

nInput = Convert.ToDouble(txbAMSEZPay.Text)
nConstant = 3

nNewValue = ((Math.Floor(100 * (nInput / nConstant))) / 100) * nConstant
All of the below are rounding up:

iNumber = Convert.ToInt32(nDouble)
iNumber = nDouble \ 1
iNumber = nDouble
iNumber = CType(nDouble, Integer)
iNumber = Math.Round(nDouble, 0)
iNumber = Math.Ceiling(nDouble, 0)

Thank you,
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform