Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Digits separators

Status
Not open for further replies.

redrick

Programmer
Feb 13, 2003
6
IT
Hello to everyone.
I've a Windows 2000 server with a SQL Server 2000 and IIS web server all in english.
I've stored some data in decimal format and I read them via ASP to visualize them on a web page.
The problem is that I want to see those numbers with the european notation for the separators.
For e.g.:the number 123456.18 is visualized as 123,456.18, but I want to visualize it as 123.456,18.
I've tried to change Windows and SQL regional settings (to Italian) but nothing has changed.
Do someone have any suggestion?
Thank you,

Riccardo
 
This is more of an ASP question (so you might repost in that forum) --- isn't it??? I don't think how it is stored in SQL will have anything to do with how it is displayed on the page.

In your ASP I would wager that you NORMALLY have a line like
SetVar "Quantity", FormatNumber(fldQuantity,2)
I have not used FormatNumber this way, but I DO use FormatCurrrency like this
SetVar "Dollars", FormatCurrency(fldDollars,2,-2)
note the -2 at the end --- it says to use the computer's regional settings. According to one of my favorite sources it should work.
 
You're right, but I've already tried formatNumber(variable,2,,,-2) and formatCurrency(varible,2,,,-2).
In both cases (with the regional settings setted up in the right manner, so with a point to separate digits and comma for the decimals) it didn't work in the right way.
In the first case I see the 123,456.78 number and in the second case €123,456.78 (with the € simbol that I don't need).
So, I was thinking if the solution can be in SQL or in a kind of conversion.
I've created a SQL procedure to convert the numbers from decimal to varchar and it also puts in the right position the points and comma by parsing the string.
The problem is that I've to run this procedure for each number (and I've a lot of numbers) and the server goes out of time.
But, anyway, thank you for answering me

Riccardo
 
Repost in the ASP forum and tell them (me - I will see it there too) that you have already tried the -2 option (in other words combine your two things above).

I will be interested to hear the result.

I wonder if you could write the procedure in VB and put it on the ASP page... that way it would not be a SQL time out that you would be getting.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top