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

Question about format

Hi all, I have a question,
I'am writing increment number in a file wich reset after reaching 15.

I have code like below.

Dim counter

Counter =1

and at the end of the input i have the line
counter = counter +1

All is fine so far but my output now is like below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

What I want is a leading zero that the output will be as follow:

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15

I hope that anybody do have a solution for me.

Thanks in advance.
Data Manager
Mercurius Cards Company
Tel. (+31) 75-6476694
Fax.(+31) 75-6476676


Jan 23 '06 #1
2 3866
Johnny wrote:
Hi all, I have a question,
I'am writing increment number in a file wich reset after reaching 15.

I have code like below.

Dim counter

Counter =1

and at the end of the input i have the line
counter = counter +1

All is fine so far but my output now is like below:

1
2

What I want is a leading zero that the output will be as follow:

01
02


Format() with the string of "00".
Check the help for what it means and other format characters

--
Dean Earley (de*********@icode.co.uk)
i-Catcher Development Team

iCode Systems
Jan 23 '06 #2
I just answered this question in another newsgroup that you posted to.

From a post by Jeff Johnson:

"You have posted this question individually to
multiple groups. This is called Multiposting
and it's BAD. Replies made in one group will
not be visible in the other groups, which may
cause multiple people to respond to your
question with the same answer because they
didn't know someone else had already done it.
This is a waste of time.

If you MUST post your message to multiple
groups, post a single message and select all
the groups (or type their names manually in
the Newsgroups field, separated by commas)
in which you want it to be seen. This is called
Crossposting and when used properly it is
GOOD."

Rick
Jan 23 '06 #3

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

Similar topics

8
by: LG | last post by:
Just have a question with regards to the clipboard, and how to read what other applications (Adobe InDesignCS) place in the clipboard. I am currently in the process of creating a booklet from a...
5
by: mcbill20 | last post by:
Hello all. I have a really basic question that I hope someone has a better answer for. I apologize in advance-- I know this is probably a really basic question but I am used to Oracle rathern than...
13
by: Roy | last post by:
Hi all, I'm creating a project that should always use this date format when displays the dates or create dates. The back end database is a SQL Server and I like to know what is the logical way...
42
by: mellyshum123 | last post by:
I need to read in a comma separated file, and for this I was going to use fgets. I was reading about it at http://www.cplusplus.com/ref/ and I noticed that the document said: "Reads characters...
16
by: Bruce W. Darby | last post by:
I've almost completed my little application for work. This weekend I've been working on Streams so I can write a logfile showing the work that was accomplished. Wanting to make each logfile...
0
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
8
by: Fred | last post by:
I've got following program encapsuled fscanf, however, it doesn't work. I'm sure that the content format in "a.txt" is OK, the content would be correctly read if using fscanf directly, what's...
8
by: Perl Beginner | last post by:
I am using Win32. I have created an excel spreadsheet, formatted the columns and rows, and would like to write to the cells…all of this using Spreadsheet::WriteExcel. My issue is, my script is very...
5
by: troy_lee | last post by:
I have a table that has a PK field with the following format: Dyymm123. So that, a typical number might look like this D0806270. The first character is literal and never changes. The next four...
3
by: troy_lee | last post by:
I have a form that asks for the month, the year, the number of weeks in the month and the beginning date for the month. I want to be able to: Number the weeks (e.g. 1, 2,3, etc.) Assign a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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.