473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

numeric with leading zeros

How can I represent eg. 23633.78 with leading zeros in format:
000000002363378

In other words the field is 15 characters length and when I put number I want to place leading zeroes on the left. The number must not be rounded!

Thanks in advance for your help!
Nov 11 '11 #1
1 2297
mcfly1204
233 100+
If you know that you will always want to display two decimal places, you can just convert the number to a string and format the string.

Expand|Select|Wrap|Line Numbers
  1. decimal number = 23633.78M;
  2.  
  3. string formattedNumber = string.Format("{0:000000000000.00}", number);
Nov 11 '11 #2

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

Similar topics

5
by: samik_tanik | last post by:
I need to export a datagrid to Excel. I could did this. But, also need to keep the leading zeros in the data. How can I acheive this? Any help would be appreciated. -- Thanking you in...
1
by: mmmgood1 | last post by:
Help, I'm linking an excel spreadsheet in access and I have datafields with leading zeros (01021). When the file is linked in access, I get a #num in the field with the leading zeros. The zeros...
6
by: Clint Stowers | last post by:
Using A2k Exporting a query to a CSV file. The problem is any text fields (i.e. 000345) lose any leading zeros. Exporting to an excel file this problem does not exist. Tried to create a...
4
by: Brian Henry | last post by:
Say I have a text string like "0002323235-3434-3545" and I want to remove the leading zeros, would a regular expression work here? sorry I haven't worked with regex's that much and still need to...
4
by: campbellbrian2001 | last post by:
I have a Query I'm writing and have a problem: I have an employee text field (not numeric) with typical values: 165461 050565 000542 653431 156334 etc.
3
by: ineedahelp | last post by:
Can anyone help me...I am trying to output my access report to excel. One of my fields is formatted as text, but excel is dropping leading zeros...only on the records where all values are numeric. ...
5
by: Code::Tyr | last post by:
Hello. I have a simple problem and need help. I am developing a simple file system that stores info based on folder names. Now, I only have one problem. How do i format (int i = 2) into a string...
6
by: JimmyKoolPantz | last post by:
Task: Customer wants a script of the data that was processed in a "CSV" file. Problem: Zip-Code leading zeros are dropped Basically we have a client that has requested a custom script for...
2
by: cmdolcet69 | last post by:
Does anyone know how to set a property to display the leading zeros in the numberic updown control for vb 2005? I'm using the control and want to input a value of 01 however it will just show 1?
2
by: Pete Forman | last post by:
I'm holding off installing Python 2.6, waiting for some packages to become available for it. I wonder if someone could tell me the best way to avoid future problems parsing decimal integers with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.