|
-
Nov 23rd, 1999, 04:01 AM
#1
Thread Starter
Junior Member
I am using the format function. I need to have a defined amount of characters. For instance it may read in the number 15 however the field is 7 characters long so it needs to write to a file with leading 0's. Also how do you read in decimal numbers (e.g. 3.6) and make it write to a file as 36.
Any suggestions?
-
Nov 23rd, 1999, 04:12 AM
#2
when saving your values just pad them yourself, eg.
sSaveString = Right("0000000" & Str(iValue), 7) 'e.g., iValue = 15, would result in sSaveString = "0000015"
As for the Decimal Values, Multiply the Value by 10^(No. of Decimal Places), eg.
3.6 * 10 = 36
3.25 * 100 = 325
etc..
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|