convert number to text

hi,

I have to convert number to text (100 -> hundred)
is there any one who know where to find a function to do that

thx

--
Alexis Maillot


0
alexis
8/14/2001 8:08:03 AM
sybase.powerscript 7704 articles. 0 followers. Follow

3 Replies
422 Views

Similar Articles

[PageSpeed] 17
Get it on Google Play
Get it on Apple App Store

Hi Alexis.

I dont think that there is such a function, but who knows 
but you can make one your self!


Start by deciding how large numbers you want to handle

for ex max is one million

then you know you have six digits to handle

sample 
1.236.123

This would render the text 
onemillion twohundredthirtysixthousend onehundredtwentythree
or a format you prefer

Start by picking out the lengt of the string
lets just start with three and you will solve the rest by your self,
*********************************************************
string ls_number =123, ls_text
long ll_len 
long ll_number
ll_len = len (ls_number)

IF ll_len = 3 then
   // pick first digit using pos mid or optional function
 
   // use a choose case to verify if the text should be 
   Choose Case ll_number
      Case 1
         ls_text = "onehundred"
      Case 2 
         ls_text = "twohundred"
........
   end choose
   // pick sekond digit using pos mid or optional function
   ll_number =...
   // use a choose case to verify if the text should be 
   Choose Case ll_number
      Case 1
         //if number is 1  the pick next digit to valide if it         is 
ten eleve twelve etc
         ls_text = ls_text + "eleven"
      Case 2 
         ls_text = ls_text + "twenty"
........
   end choose
   // pick third digit using pos mid or optional function
   // if second digit was 1 then skip else
   ll_number =...
   // use a choose case to verify if the text should be 
   Choose Case ll_number
      Case 1
         ls_text = ls_text + "one"
      Case 2 
         ls_text = ls_text + "two"
........
   end choose

and so one !!

I have a feeling that you know wat I mean.
it takes a bit of time but it works.


Regards Kristian


0
Kristian_K
8/14/2001 9:55:31 AM
I think I gonna make it.

Thanks for your help.


--
Alexis Maillot
<Kristian_K> a �crit dans le message news:
814C9BE298E127710036859485256AA8.003087DE85256AA8@webforums...
> Hi Alexis.
>
> I dont think that there is such a function, but who knows
> but you can make one your self!
>
>
> Start by deciding how large numbers you want to handle
>
> for ex max is one million
>
> then you know you have six digits to handle
>
> sample
> 1.236.123
>
> This would render the text
> onemillion twohundredthirtysixthousend onehundredtwentythree
> or a format you prefer
>
> Start by picking out the lengt of the string
> lets just start with three and you will solve the rest by your self,
> *********************************************************
> string ls_number =123, ls_text
> long ll_len
> long ll_number
> ll_len = len (ls_number)
>
> IF ll_len = 3 then
>    // pick first digit using pos mid or optional function
>
>    // use a choose case to verify if the text should be
>    Choose Case ll_number
>       Case 1
>          ls_text = "onehundred"
>       Case 2
>          ls_text = "twohundred"
> .......
>    end choose
>    // pick sekond digit using pos mid or optional function
>    ll_number =...
>    // use a choose case to verify if the text should be
>    Choose Case ll_number
>       Case 1
>          //if number is 1  the pick next digit to valide if it         is
> ten eleve twelve etc
>          ls_text = ls_text + "eleven"
>       Case 2
>          ls_text = ls_text + "twenty"
> .......
>    end choose
>    // pick third digit using pos mid or optional function
>    // if second digit was 1 then skip else
>    ll_number =...
>    // use a choose case to verify if the text should be
>    Choose Case ll_number
>       Case 1
>          ls_text = ls_text + "one"
>       Case 2
>          ls_text = ls_text + "two"
> .......
>    end choose
>
> and so one !!
>
> I have a feeling that you know wat I mean.
> it takes a bit of time but it works.
>
>
> Regards Kristian
>
>


0
alexis
8/14/2001 10:13:53 AM
Alexis,

Please take a look at http://www.justpbinfo.com/listarchive/msg01292.html

This has a PBL attached with a function that does what you need.

HTH

Sanjiv.


"alexis maillot" <a.maillot@wyniwyg.com> wrote in message
news:2DMLjvJJBHA.65@forums.sybase.com...
> hi,
>
> I have to convert number to text (100 -> hundred)
> is there any one who know where to find a function to do that
>
> thx
>
> --
> Alexis Maillot
>
>


0
Sanjiv
8/14/2001 5:27:04 PM
Reply:

Similar Artilces:

Convert Number into Text...!
 hi i have a field of demand number extract from the database and its datatype is number. and another field is item which is also extract from the database and its datatype is text...! i want to select a demand number from the dropdownlist then item change automatically in dropdownlist with respect to demand number. this is my code:  Protected Sub DemandDropDownList_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DemandDropDownList.SelectedIndexChanged        commandtext1 = "Select itemdes...

Converting numbers to Text
Does anybody know off hand where in the PFC I can find the function for converting a number to a text string? Thanks! Pete I don't see one. (I search for "one".) However, lots of algorithms have been posted: http://groups.google.ca/groups?as_q=numbers+text+one+two+three&safe=images&ie=UTF-8&oe=UTF-8&as_ugroup=*.public.powerbuilder.*&lr=&num=100&hl=en BTW, this would have been a great question for the PFC newsgroup!! Good luck, Terry [TeamSybase] and Sequel the techno-kitten On 30 Nov 2004 09:33:02 -0800, PC wrote: >Does...

Converting Numbers to Text
All, I am trying to figure out how to do this.  I have a repeater, and I check the amount rows returned by getting the repeater.items.count property.  I then pass that value to a string. If my repeater has a value of 24 rows, is there a way to format '24' so that it displays 'twenty-four'?  In other words, is there a way to convert a number to words? Karl ------------------------------------'Old and wrinkled is not what I expected to become when I grew up!' I am not sure if that method is provided by the BCL (Base Class Library). I would suggest doing ...

Convert Excel number to text
 Hi Guys,im reading records from an excel file everything works fine, but when a number is encountered in card number then no value is fetched i have also tried converting the text to string but no result. please let me know how do i achieve when we have mixed data type in one column string and number like belowcustcardnoA123 works fineB345 works fineC789 works fine1234  gives blank valueany help is highly appreciated thanksfairozkhan   Could You please provide us little code of how You are reading data from Excel?Please mark as answered, if my post helped You ;) &nbs...

Convert a number into its text presentation
Hi guys, I have created a nice tool that converts a number between 0 - 999,999,999 into its text presentation. I don't know if such code is available elsewhere but here it is for download and a demo is available at my website:  www.deepinconcept.net  Feel free to post your comments ir anyone has an idea to extend it. Hope you will like it,  Joseph Ghassan.  Very very cool.  That must have taken some time!  Is it available for use on any site? Thanks Gaucho,  yes u can download the code and use it on any site. it is free!   The utility...

Convert Textbox.text to a number
I have a textbox that I want to be able to apply a formula to but I cant because its a string. I've tried Int32.Parse(TextBox_wieght.Text.Trim().ToString());      so i can then use my formula but it keeps telling me that i cant implicitly convert type int to string Any suggestions? Im coding in C#    a working example would be much appreciated!!   Thanks,   Karlcreator of www.bio-gen-x.comThanks to Asp.net, I finally got this project off the ground! Trystring sValue =  "" + TextBox_wieght.Text.Trim();int iValue = 0; if ...

Converting numbers to zero-filled text
I need to output a database to a fixed-length text file, with numeric columns left-filled with zeroes. For instance: 15 1254 135 Need to be output as: 00000015 00001254 00000135 I know there's a pretty easy way to do this but I can't remember. Anyone else? Try this... SELECT RIGHT ( STRING ( '0000000000', colname ), 10 ) Breck On Thu, 13 Jun 2002 10:42:41 -0400, "David Gerdner" <dave@gerdner.org> wrote: >I need to output a database to a fixed-length text file, with numeric >columns left-filled with zeroes. For...

convert number (100) to text (hundred)
hi, I have to convert number to text (100 -> hundred) is there any one who know where to find a function to do that thx -- Alexis Maillot long ll_numer string ls_number ll_numer = 100 ls_number = string(ll_number) enme "alexis maillot" <a.maillot@wyniwyg.com> ha scritto nel messaggio news:9Ci71uKJBHA.275@forums.sybase.com... > hi, > > I have to convert number to text (100 -> hundred) > is there any one who know where to find a function to do that > > thx > > -- > Alexis Maillot > > > ...

Convert crosstab month from number to text
Greetings, I have created a crosstab in IM 9 and I have dates in months as my columns. Currently they are displayed as 1,2,3,4, etc.... I would like instead for them to be Jan, Feb, Mar, Apr, etc.... How do I go about it? Thanks! Nevermind, I figured it out. > Greetings, > I have created a crosstab in IM 9 and I have dates in > months as my columns. Currently they are displayed as > 1,2,3,4, etc.... I would like instead for them to be Jan, > Feb, Mar, Apr, etc.... How do I go about it? > > Thanks! ...

converting numbers to text.....help please!!!!!!!!!!
hello. I desperately, desperately need to get this to work. Here's the deal. I have some numbers which represent people's pay. I need to write code which will translate number into text....just like on the paycheck. If the number says "324" it needs to spell out "three hundred twenty-four". I thought of dividing the number in thousands and hundreds and making associations with denominations, but that seems like a heck of a lot of code for something apparently so minicule. If you can solve this, i'll scream! 1,291 program output: "one thousand two hundred nin...

Converting GridView cell text to a number
Hi All,  Hoping you can help with what should be a simple task. I am trying to add the values in two GridView cells together, but first I have to convert the cell text to integers. I thought that this would work: GridView1.Rows(i).Cells(1).Text = (Convert.ToInt32(GridView1.Rows(i).Cells(1).Text) + Convert.ToInt32(FormalGrid.Rows(j).Cells(2).Text)).ToString But I get an error: Input string was not in a correct format. I then tried: GridView1.Rows(i).Cells(1).Text = (Convert.ToInt32(GridView1.Rows(i).Cells(1).Text.ToString) + Convert.ToInt32(FormalGrid.Rows(j).Cells(2).Text.ToString))...

Convert Rich Text to plain text
Hello,I'm new to web development and I've run into a problem with the ASP.Net Web application that i'm developing and am hoping someone can help.I'm querying an SQL server database table that holds some text in rtf format. I need to display this text in a tooltip (caption) when a user hovers over an image on the web page.Does anyone know how can i convert the rich text to plain text in my web application so i can display it in the tooltip?Thank you!G I had a similar problem.  Just wanted to post the solution my clever co-worker came up with since no one else had replied.  First,...

How to convert a hexadecimal number to normal number?
In VB.NET, how can I convert a hexadecimal number (like FF) to normal number (like 255) ?? Come on, gurus, this must be a piece of cake for you!:-) Any help appreciated, thanks, Hooker try to use System.Convert.ToInt16(your parameter) hope this work...if this doesn't work there should be some method in the 'convert' class.Toronto Trade show displays | Toronto Printing Solutions | Toronto Printing...

How to Call the phone numbers & play .wmv file generated by Text toSpeech Converter
Hi Programmers, I am very new to ASP.Net mobile. I have developed an simple asp.net application (www.buzzmenow.net). It is almost finished. The only one thing i have to do is "Call the phone numbers of Database & play .wmv file generated by Text toSpeech Converter". Now i need someone`s assistence who can let me know how can i do this. Is it possible to use asp.net mobile web forms in a simple asp.net project. How can i do this??? Please someone help me.I`ll be greatful to you. Thanks.  is its works?...

Web resources about - convert number to text - sybase.powerscript

List of converts to Buddhism - Wikipedia, the free encyclopedia
Ajahn Brahm (born 1951), Religious teacher and student of the late Thai monk Ajahn Chah . Currently he is the abbot of the Bodhinyana Monastery, ...

Facebook Timeline For Pages: 8 Million Converts, 29 Million To Go
... reach to 98 percent of users who liked its page, as well as to double its engagement rate, during a 28-day period. Dr. Pepper hasn’t yet converted ...

Facebook stock roundup: Execs offload more stock, directors convert shares
... Bowles, the former co-chair of the now-defunct National Commission on Fiscal Responsibility and Reform, and Reed Hastings, Netflix CEO, converted ...

How to Convert Leads Into Buying Customers - The 9 Step Sales Process EVERYONE Should Use
... School of Business in Toronto on the topics of Sales and Entrepreneurship. I shared with them the sales process that I find How to Convert Leads ...

Bitcoin : Should I convert my savings to Bitcoin?
Answer (1 of 7): You should think of this question as "Should I invest all my savings in Bitcoin?", and not "Should I have my savings denominated ...

Coordinates - Calculate and Convert a Position on the App Store on iTunes
Get Coordinates - Calculate and Convert a Position on the App Store. See screenshots and ratings, and read customer reviews.

Opinion: These 5 things made me a happy iPad Pro convert
... like I needed a bigger device. But after three weeks with my iPad Pro, several things have changed my mind, and I’m officially a happy convert ...

$100 device converts all your film to digital photos
... still on film negatives. Today, we've got the perfect Amazon Cyber Week deal for you: A Wolverine F2D Mighty 20MP 7-in-1 Film to Digital Converter ...

WWE diva converts to Christianity, confesses to a life of sin
Stunning wrestling diva Taryn Terrell has shared a dramatic knock-down testimony of conversion from life in the ring to life with Christ.

Stanford Designs Underwater Solar Cells That Convert Greenhouse Gases Into Fuel
... solar industry and the battle against climate change. Importantly, writes Stanford [&hellip Stanford Designs Underwater Solar Cells That Convert ...

Resources last updated: 12/4/2015 6:50:15 AM