473,396 Members | 2,076 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,396 software developers and data experts.

read 57 as fifty seven

228 100+
how can i read such numbers, say 57 as fifty seven and paste it to caption of a form or hold it on a string? the input can include a two decimal points as well.
Jan 7 '09 #1
3 1405
debasisdas
8,127 Expert 4TB
You can use the following code to spellout the number from oracle database and use the output in VB .

Expand|Select|Wrap|Line Numbers
  1. SELECT TO_CHAR(TO_DATE(57,'J'),'JSP') FROM DUAL
Jan 7 '09 #2
samvb
228 100+
i actually have the numbers in variables, not from database. just send 57 to a functino and the function returns fifty-seven. i know it iz possible coz i saw it in softwares, i just cant figure it out.
Jan 8 '09 #3
danp129
323 Expert 256MB
You will need to take the initiative to find example source code that best fits your needs by trying to use some of the examples found in your searches. You may want to combine code from one example to another if one works better for the whole numbers but the other displays the decimals in the fasion you want.

That being said, Google for:
vb "money to words" OR "currency to words" OR "number to words" -vb.net

Note that some countries may handle billion/trillion/quadrillion/etc.. differently:
Million, Billion, Trillion...

You will need to test the function to ensure that it will handle a number as large as you need and test for any rounding errors. Then you will need to ensure that the user cannot enter a value larger than the function can handle. You may end up wanting to pass the function the whole number first and then the decimal value as "0.##" separately and then concatenate the results to be able to handle larger values. IE a double can handle 999,999,999,999,999 but if you have .5+ on the end of that it will be rounded up and I think switch to a negative because VB uses signed data types. The code I played with changed 999,999,999,999,999.50 to "One Dollar and Zero Cents"

This example worked decently but you have to fix the line wraps and you'll want to get rid of the cent rounding:
Convert currency numbers into text by Newsgroup Posting
Jan 8 '09 #4

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

Similar topics

5
by: windandwaves | last post by:
Hi Gurus I am new to mysql. I need to select the lowest number from seven fields where the value is greater than 0. Can someone tell me how to do this. So far, I have Select RF1, RU1,...
40
by: Abby | last post by:
My .dat file will contain information like below. /////////// First 0x04 0x05 0x06 Second 0x07
6
by: Casey Bralla | last post by:
I'd like to read ASCII data from a serial port, but (once again) I'm having trouble getting started. (Can't seem to find the basic level of docs to get going <sigh>) I'd like to use only...
4
by: Jason | last post by:
I need to open a file for reading, but I only know part of it's name. The file I want to read is in the format of xxx-yyyy-zzz.EXT The last three digits of the file name are different on each...
7
by: Hallvard B Furuseth | last post by:
I'm trying to clean up a program which does arithmetic on text file positions, and also reads text files in binary mode. I can't easily get rid of it all, so I'm wondering which of the following...
3
by: mattcolenutt | last post by:
Senario: I need to reschedule an action. I need to make the "reschedule in" days only multiples of seven so that the action will happen on the same day, only a week or two (or more) in the future....
2
by: Skisy | last post by:
Using VB6: Hi I'm having a bit of trouble with this, I know what I've got to do (or rather one way of doing it) but I'm struggling with the actual implementation of my thoughts into code. I've...
1
by: jmf777 | last post by:
Hi if your here to help thanks in advance. My problem is I'm writing a code to take seven strings put in by the user sort them alphabetically than print them, but I my compiler is telling me strcmp...
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
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
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
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 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.