473,771 Members | 2,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to indicate decimal with 4 digits behind decimal point

1 New Member
I have the following case "IT1":
objEdiTransacti on.AppendLine(o bjReader.Segmen tText);
objPOBuilderLin e = objPOBuilder.Ap pendLineItem();
objPOBuilderLin e.Quantity = Convert.ToDecim al(objReader.Ge tNumber(2, 0));
objPOBuilderLin e.UOM = objReader.GetSt ring(3);
objPOBuilderLin e.Price = Convert.ToDecim al(objReader.Ge tNumber(4, 0));
objPOBuilderLin e.ItemNumber = objReader.GetNu mber(7, 0).ToString();
break;


I need to change it to make the values have 4 digits behind the decimal point.
Jul 19 '12 #1
0 1173

Sign in to post your reply or Sign up for a free account.

Similar topics

3
5823
by: Bei | last post by:
I have variable, say "total". It can be an integer or floating number. No matter what value it stores (5 or 5.1 or 5.24), when I display it, is there a way I can make it display it with fixed 2 decimal digits, like 5.00? Thanks
4
9733
by: italia | last post by:
I changed the Fieldsize Property from text to Long Integer and Decimal Places = 6. I had decimals in the original field. But after the transfer, the digits after the decimals are gone. Now even after I have change the Fieldsize propert to Decimal with Scale = 2, the digits after the decimal are not seen. For eg. If the text was 16.27. After I changed to long integer, it
1
3877
by: Shreyas Kulkarni | last post by:
hi there, recently i have got a problem regarding calculation of sum of digits in a floating point or precision number. the weird behaviour of compiler/language is preventing me from calculating the sum of all digits. the compiler doesnt store the number as given by the user. some of the precision digits are lost or changed (at will!). so by any method, i m unable to reliably calculate the sum of provided number; except i input the...
2
3094
by: Scott | last post by:
I want to display a decimal as a currency value for instance £65.00 or £58.47, but at the moment the code doesn't seem to work correctly. Can I declare this variable to be shown with 2 decimal places any easier??? Maybe at the start of the program?? Here is my code... o65 = CType(o65, Decimal).ToString("C") win17 = CType(win17, Decimal).ToString("C") total = CType(total, Decimal).ToString("C") total = price + o65 + win17
3
6482
by: Joćo Araśjo | last post by:
Hello all, I'm a VB6 programmer, and I'm starting to change basic functions to .NET. I've seen an example on how to allow only digits on a textbox control, using the Edit Control Styles on a specific class DigitTextBox (code example below). There is a constant that behaves the way I want except that it misses the decimal separator. Is there any way to do this, using the same method (on VB6 I used the keypressed event to filter the...
2
1010
by: Niron kag | last post by:
Hello ! With c# ,I want to get a number with a spcific number of digits after the point , for example if the specific number is '2' : for this number 334.23523 I want to get 334.23 How can I do it? Thanks!
1
1184
by: Niron kag | last post by:
Hello ! With c# ,I want to get a number with a spcific number of digits after the point , for example if the specific number is '2' : for this number 334.23523 I want to get 334.23 (2 digits after the point) How can I do it? > Thanks!
3
16323
by: coolindienc | last post by:
Hello guys, How would I control digits after decimal point? Andy
9
1976
by: shk253 | last post by:
I've been asked to write a program that calculates the total time worked. I use struct to create variable type time1, and ask the user to enter time in and time out. I convert both to seconds and then subtract time out from time in and have seconds worked. Its mostly done, but this is my question: Question: When converting seconds back to hrs and mins, how do I leave the decimal digits out and just take the numbers before the decimals and...
1
1719
by: ankita pandya | last post by:
I've a problem in a program in c++. It's abt converting decimal no. to binary floating point form. I wish if anybody help me for this!!!!!
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.