|
| |
|
|
box
Posts: 117 Joined: 12/10/2002 Status: offline
|
It ignores Decimals! - 1/26/2008 2:12:22
I dont know what to modify in order to accept decimal, the following it just ignores decimal! any idea pleae? <% MValue = (FP_Field(fp_rs,"yourpayment")) MValue1 = (FP_Field(fp_rs,"yourcharges")) If MValue1 = "" then MValue1 = 0 If MValue = "" then MValue = 0 MValue2 = cLng(MValue1)-MValue %>
|
|
|
|
BeTheBall
Posts: 6336 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: It ignores Decimals! - 1/26/2008 14:50:07
Use cDbl <% MValue = (FP_Field(fp_rs,"yourpayment")) MValue1 = (FP_Field(fp_rs,"yourcharges")) If MValue1 = "" then MValue1 = 0 If MValue = "" then MValue = 0 MValue2 = cDbl(MValue1)-MValue %>
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
box
Posts: 117 Joined: 12/10/2002 Status: offline
|
RE: It ignores Decimals! - 1/26/2008 16:58:40
thanks for reply, but this function just round the number i want the exact number. if is 1.75 i want 1.75 not 2. any idea?
|
|
|
|
BeTheBall
Posts: 6336 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: It ignores Decimals! - 1/26/2008 20:07:22
You may want to look in the database and see how the numbers are being stored. Cdbl will not round which leads me to wonder what kind of numbers are coming out of the database.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
box
Posts: 117 Joined: 12/10/2002 Status: offline
|
RE: It ignores Decimals! - 1/26/2008 20:43:36
I use Access and the type of data is long integer, and if i change it to decimal it gives me the following error: Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch /ep/user/detail_charge_pay.asp, line 151
|
|
|
|
ou812
Posts: 1538 Joined: 1/5/2002 From: San Diego Status: offline
|
RE: It ignores Decimals! - 1/26/2008 22:18:35
Does your data type of long integer have a decimal places set? Almost sounds like it is set to zero.
_____________________________
-brian EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
|
|
box
Posts: 117 Joined: 12/10/2002 Status: offline
|
RE: It ignores Decimals! - 1/27/2008 0:27:38
quote:
decimal places set Is set to Auto!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|