I have a client with a database whose author didn't do any type of form verification. Hence, in the "price" field, there are values such as 213000, $32,400, 5000 USD, etc.
What I am hoping is that some might tell me how to take a string, cut out all white space first, then go character by character to test for INT. Once done, count the characters, insert a "," where appropriate, and display on a page? Can this be done?
when I read a float number from my sql database and use format currency to to display it it always puts a question mark before it. why it does this? I've checked the value in the database. response.write on the value itself.
However it shows the £ sign when I want it to be a Dollar, i know that it is because they are my computer settings, but how do I get it so that no matter what your computer settings are it always shows dollars. Code:
My database value for the format field is 1250. I would like to format that value as $12.50. Below is my code. Can someone please help, I am not able to get this straight.
field spec: field name = prate field datatype = number decimal places = 0
<%response.write(formatcurrency(rs("prate"),2,-1)
I know my database setting and code is wrong, can someone please help.
In my response.write line, I need to format a field to be a currency value. Is there a quick and dirty way to do it or is it an involved edit? Here is my code:
I cannot get the FormatCurrency function to work properly on my site, which is hosted on a server 2k3 box w/iis installed.It works just fine on my local iis machine, however w/out a glitch.
Here are the two side by side:
LOCAL MACHINE IIS over WINXP, Access Db, datatype=NUMBER, Format=CURRENCY HOST SERVER IIS over 2k3, Access Db, datatype=NUMBER, Format=CURRENCY Error Message that appears on host server... INTERNAL SERVER ERROR, error 500 Datatype mismatch....
Is there an easy way to change Currency formatting from USD to EUR (use comma as decimals delimiter instead of period)? I'm using Windows 2000 Server/IIS 5.0 in English. I'm serving both USD and EUR dynamically from the same source codes. I'd like to change Currency formatting automatically when a person chooses EUR.
Getting the HTML code of a website, and then extracting specific information. Im trying to get flight information from a website, but there may be more than one flight in a search criteria...so i want it to loop untill it cant get any more.
I've managed to get the html from the other website, and i've also managed to get the first flight on the page.
I believe my problem is with this part of code (might want to review full code below):
I have a string (ie.1.0.1.39) I want to replace the number after last "." with another number. What would be the best way to do it? the lenght of the number after last "." may change and the lenght of the number to be replace varies as well
I have a dynamic string where the length varies.I need to write a function that will return part of a string, placed between first 2 symbols and last 3 symbols. For example the string DEVELOPMENT will return the following: ...
I have a very long string, that I need to cut up into more usable sections and display or write to text file. It should: Read the string in, move along the string x number of characters then find the nearest end of the sentance, eg. a . or ? write a new line and do this again. Basically I want to end up with a number of lines of full sentances of a similar length.
This looks elementary but I dont know how . How do I remove the trailing text after a symbol @. my_username@email.com and wanted my_username to remain as a result?
I have a first name last initial, all displayed as one. I want to break it appart & show capital letters on the initials. IE: "johnd" > "John D"
Did a search around the forums, but only found info on the "replace" function. Don't think I could do this with that function alone. This should be a simple problem, but I'm pretty new to asp (not to programming though).
rsPART calls a table in access and i think the rest is self explanatory. the data type in access is already set to currency. so how do i get "cost" to display in a currency format? is there another way to format currency?
I have results from a database which reads like this on my browsers page
20031231
Now I would like to change this so that I can make it look like this
31/12/2003
I am assuming that in ASP there is some kind of function that allows you to extract the string character by character and the concatenate it back together, but I don’t know what it is???? Could someone please pint me in the right direction???
I have an IP Address, for example 15.65.325.98, and I need it to return everything after the third dot including the dot. So in this case, it should return .98. The end of the IP will be dynamic and may contain 1,2, or 3 characters which is why a simple Right() Function will not work.
Ok, given a string up to any length, lets say 1,000 characters. I want to only display no more than 450 characters, but I want to end the string where a "." is found. In other words, have it go the 450 character, then from that point backwards, find the first "." That will be the end of what is displayed. I don't want hanging sentences in other words...
How do I format a specific string and add dashes inside the string. The output I get from the recordset, for example, is 007275153. I want to format the output as 00-727-5153.
Also, if a string in a database is C-1411C1, how can I remove the "C-" at the beginning of the string?
How do i check the whether a string entered...matches a fixed format that i have created? suppose i have to checkk whether a string entered is of this format.. F-## ( where '#' is any digit)..
For example if the user enters F-02 ..Then the check would return TRUE.. If the user enters F02 ...Then the check would return false.. I would like to do this check on the server side...ASP ( not javascript)]
I have a 20 character string that I need to format in a certain way. For instance, here is the raw string:
12345678901234567890
And I need it to look like this:
123-45-6789-01-234-5-67-8-90
It wouldn't bother me if the number was entered into a text box without any dashes, but then before I submit the number to the db I would need to enter the dashes in the correct spots. Can anyone give me an idea of how I can accomplish this?