raybetts
asked on
vb.net (.net 1.1) double question
My app receives double values through e.g. 8740
From the calling app, this translates to £87.40
But when I save it in my audit table (and I understand why it does it this way) it is £8740.00.
Is there something in the .net framework to achieve my goal (place a decimal place in the right place and not on the end) or will I need to write a small function?
Thanks
From the calling app, this translates to £87.40
But when I save it in my audit table (and I understand why it does it this way) it is £8740.00.
Is there something in the .net framework to achieve my goal (place a decimal place in the right place and not on the end) or will I need to write a small function?
Thanks
your audit table column takes incoming data and recast to how you have your table set up..recast the column in your sql to format the data correctly..
Is it possible to provide your code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
post code here..so we can look..absolutely...I was just wanted you to be sure the SQL side columns were data cast correctly...make sure you take out your personal info b4 u upload...
This is ugly, but works:
' dbl = 8740
dbl = Mid(dbl, 1, CStr(dbl).Length - 2) & "." & CStr(dbl).Substring(CStr(dbl).Length - 2)
ASKER
Amazing how the brain struggles after 9 hours!!
A simple solution that I am gutted I couldn't see myself with my aching brain! Thanks :)
A simple solution that I am gutted I couldn't see myself with my aching brain! Thanks :)