473,385 Members | 1,912 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,385 software developers and data experts.

Need Fast help pls... Format issue!

Hi,

Need fast help pls:

Format (1 "###,###.##") = "1" <<<<----- OK!

Format (0, "###,###.##") = "" <<<<----- WHY?

How can I make this work with Zero?

I need to use Format, otherwise it will be a time consuming work to process
0 in a If of some kind.
--
Thanks in advance
Ali Eghtebas Sweden
Nov 20 '05 #1
6 839
Ali Eghtebas wrote:
Format (1 "###,###.##") = "1" <<<<----- OK!

Format (0, "###,###.##") = "" <<<<----- WHY?

How can I make this work with Zero?

Format (0, "###,##0.##") = "1"
--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp
Nov 20 '05 #2
"Ali Eghtebas" <al***@home.se> schrieb

Format (1 "###,###.##") = "1" <<<<----- OK!

Format (0, "###,###.##") = "" <<<<----- WHY?

How can I make this work with Zero?

Format (0, "###,##0.00")
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
Hi Ali, Jochen,

As Jochen demonstrated, you need a zero in every position where
you require a digit. The '#' in the format specification says 'put a digit
here if the value requires it but if not use a space'. The '0' specifies
either the number's digit or a zero.

So "###,###.##" means give me nothing if the number is zero.

Also, if you want your decimal places, you'd use "###.##0.00"

Regards,
Fergus
Nov 20 '05 #4
Thank you all for the quick replies. I really appreciate it!

--
Regards
Ali Eghtebas Sweden
Nov 20 '05 #5
* Ali Eghtebas schrieb:
Need fast help pls:

Format (1 "###,###.##") = "1" <<<<----- OK!

Format (0, "###,###.##") = "" <<<<----- WHY?

How can I make this work with Zero?


Try this (untested): 'Format(0, "###,##0.##")'.

--
Herfried K. Wagner
Microsoft MVP
<http://www.mvps.org/dotnet>

Nov 20 '05 #6
* "Ali Eghtebas" <al***@home.se> scripsit:
Thank you all for the quick replies. I really appreciate it!


Here you will find the documentation for 'Format':

<http://msdn.microsoft.com/library/en-us/vblr7/html/vafctformat.asp>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Shlomi Schwartz | last post by:
Hi all, Why do I get the folowing date when creating it like so: var d = new Date(2003,9,2); Wed Oct 1 23:00:00 UTC+0200 2003 Isent it soposed to be:
6
by: Ali Eghtebas | last post by:
Hi, Need fast help pls: Format (1 "###,###.##") = "1" <<<<----- OK! Format (0, "###,###.##") = "" <<<<----- WHY? How can I make this work with Zero?
0
by: razheev | last post by:
Hi, I have a Table which contains 1 million rows. I want to do an unload of the table and do some massaging (tranforming) of data and do a load to a different table where the column attributes are...
4
by: Phil | last post by:
k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and made into a TIF file and placed on the client (could be in temp internet dir). The reason we need it in TIF format is...
6
by: G.Esmeijer | last post by:
Friends, I would like to read a text file (fixed length formaated) really fast and store the data into an Access database (2003). Using the streamreader and reading line by line, separating the...
9
by: cj | last post by:
I'm trying to forge ahead with Visual Basic .Net but recently I've suffered several major set backs in demonstrating VB is the future and we should move from Visual FoxPro. I really need to find...
2
by: Frank Swarbrick | last post by:
I had asked a question a few weeks ago about having problems at times accessing DB2 Express-C 9.1, and getting "SQL1032N No start database manager command was issued. SQLSTATE=57019" even when the...
95
by: hstagni | last post by:
Where can I find a library to created text-based windows applications? Im looking for a library that can make windows and buttons inside console.. Many old apps were make like this, i guess ...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
0
by: Sharath | last post by:
"Inspired" by the huge success of our first two automation fast track batches We are forced to start third fast track automation batch ...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.