i thought the following would work for currency
{0:$000,000,000.00}
but it is displaying ( for example ) :
$000,025,368.87
i don't want the extra zeros ... 6 8472
try this
{0:$###,##0.00}
but I think there must exist a shortcut ;-)
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl... i thought the following would work for currency
{0:$000,000,000.00}
but it is displaying ( for example ) :
$000,025,368.87
i don't want the extra zeros ...
Hi,
Dim c As Decimal = 12.68
Me.Text = c.ToString("c") http://msdn.microsoft.com/library/de...matStrings.asp
Ken
-------------------------
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl... i thought the following would work for currency
{0:$000,000,000.00}
but it is displaying ( for example ) :
$000,025,368.87
i don't want the extra zeros ...
if i use "c" , the formatting then follows the
System.Globalization.CultureInfo.NumberFormat in effect for the page ,
correct ?
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:ur**************@tk2msftngp13.phx.gbl... Hi,
Dim c As Decimal = 12.68
Me.Text = c.ToString("c") http://msdn.microsoft.com/library/de...matStrings.asp
Ken
-------------------------
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message news:uc**************@TK2MSFTNGP12.phx.gbl...i thought the following would work for currency
{0:$000,000,000.00}
but it is displaying ( for example ) :
$000,025,368.87
i don't want the extra zeros ...
Hi,
yes
Ken
-----------------
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:ej**************@TK2MSFTNGP10.phx.gbl... if i use "c" , the formatting then follows the System.Globalization.CultureInfo.NumberFormat in effect for the page , correct ?
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:ur**************@tk2msftngp13.phx.gbl... Hi,
Dim c As Decimal = 12.68
Me.Text = c.ToString("c") http://msdn.microsoft.com/library/de...matStrings.asp
Ken
-------------------------
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message news:uc**************@TK2MSFTNGP12.phx.gbl... >i thought the following would work for currency > > {0:$000,000,000.00} > > but it is displaying ( for example ) : > > $000,025,368.87 > > i don't want the extra zeros ... > >
Ok ...
But what if I want a shorthand format-specifier that does not rely on any
more-global objects (such as CultureInfo). Must such specifiers always be
designated character-by-character ?
For example, if I want to display currency with a dollar-sign prefix, each
group of 3 digits separated by a comma, no decimal point or decimal places,
and blank for negative or zero values, then I would have to use something
like
"$###,###,###;;"
But how to cover the case where the currency value might be larger? (more
than 9 digits might need to be present)
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:ON*************@TK2MSFTNGP12.phx.gbl... Hi,
yes
Ken ----------------- "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message news:ej**************@TK2MSFTNGP10.phx.gbl... if i use "c" , the formatting then follows the System.Globalization.CultureInfo.NumberFormat in effect for the page , correct ?
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:ur**************@tk2msftngp13.phx.gbl... Hi,
Dim c As Decimal = 12.68
Me.Text = c.ToString("c") http://msdn.microsoft.com/library/de...matStrings.asp
Ken
-------------------------
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message news:uc**************@TK2MSFTNGP12.phx.gbl... >i thought the following would work for currency > > {0:$000,000,000.00} > > but it is displaying ( for example ) : > > $000,025,368.87 > > i don't want the extra zeros ... > >
again...
I have no MVP in my name so it is not good enough???
format {0:$###,##0.00} for 123456789 shows "123,456,789.00"
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:O%****************@TK2MSFTNGP11.phx.gbl... Ok ...
But what if I want a shorthand format-specifier that does not rely on any more-global objects (such as CultureInfo). Must such specifiers always be designated character-by-character ?
For example, if I want to display currency with a dollar-sign prefix, each group of 3 digits separated by a comma, no decimal point or decimal
places, and blank for negative or zero values, then I would have to use something like
"$###,###,###;;"
But how to cover the case where the currency value might be larger? (more than 9 digits might need to be present)
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:ON*************@TK2MSFTNGP12.phx.gbl... Hi,
yes
Ken ----------------- "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message news:ej**************@TK2MSFTNGP10.phx.gbl... if i use "c" , the formatting then follows the System.Globalization.CultureInfo.NumberFormat in effect for the page , correct ?
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:ur**************@tk2msftngp13.phx.gbl... > Hi, > > Dim c As Decimal = 12.68 > > Me.Text = c.ToString("c") > > > > http://msdn.microsoft.com/library/de...matStrings.asp> > > > Ken > > ------------------------- > > "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message > news:uc**************@TK2MSFTNGP12.phx.gbl... > >i thought the following would work for currency > > > > {0:$000,000,000.00} > > > > but it is displaying ( for example ) : > > > > $000,025,368.87 > > > > i don't want the extra zeros ... > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dalan |
last post by:
This should not be an issue, but it is. I'm sure that someone knows
what little piece of code is needed too persuade Access 97 to include
a currency format for labels (Avery, mailing type). Have...
|
by: Mike MacSween |
last post by:
This looks like a bug to me.
I have an expression on a report:
=Format(Sum((**)*(/)),"0.00")
Score is byte
PercentOfGrade is double
PropDegree is single
ModuleCats is byte
|
by: DD |
last post by:
I have a UnionQry that is run from StatementsI and StatementP.
the Due and Paid colunms are currency and show the $
however when i union the two the currency format has gone.
Any help please...
|
by: Gerry Abbott |
last post by:
Hi All.
How can i put a zero decimal for my currency into my format statement,
== & ", for " & & " days. Cost " &
Format(,"Currency")
which is the data source for a textbox on a report
|
by: zlf |
last post by:
1ˇ˘Here is a number. double nu = 123
2ˇ˘Format it with
3ˇ˘The result is "$123"
I want to ask how to deformat "$123" to 123
Thx
(Currency symbol is not restricted to '$')
|
by: Slonocode |
last post by:
I have some textboxes bound to an access db. I wanted to format the
textboxes that displayed currency and date info so I did the following:
Dim WithEvents oBidAmt As Binding
oBidAmt = New...
|
by: AMDRIT |
last post by:
Hello Everyone,
I would like to format the Display Members of a combobox's datasource. Is
there a way to apply a format without subclassing the original datasource?
For example, given a list of...
|
by: crferguson |
last post by:
Hello all! I'm having the oddest issue trying to format a numeric
string as currency without decimals. For instance...
strSalary = "120000.56"
strSalary = Format(strSalary, "$#,##0")
'this...
|
by: Dhananjay |
last post by:
Hi all ,
I have got problem when i am tring to exportGridview Data into Excel
format.
It is going into text format ,but what i want is if the field is
number/currency then it should go into...
|
by: Nariban Barkan |
last post by:
Hi All,
I have a decimal value on the GridView BoundField which comes from sql
server and it seems on gridview like that;
2096.62
14899.01
I want to display that values like
2.096,62...
|
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...
|
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,...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |