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!

Hello to everyone. I've a Windows 1

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.
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).
Are there any others regional settings in IIS?
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.
Any idea?

Riccardo
 
WHat you need to do is set the session LCID....

session.LCID = 1036 (My web is a little bad right now, so I wasn't able to search for Italy's LCID...)


look here Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048

mikewolf@tst-us.com
 
Italy's LCID = 1040 Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048

mikewolf@tst-us.com
 
Great!
It works on my local machine, so I've only to upload it to the server.
Thank you very much for the tip, I was going mad to solve this...
Thank you again,

Riccardo
 
The important thing to remember about the LCID is that it already exists on the local computer. If you have a site that lists dates and currencies in different countries, the LCID setting will already be made for that location by default. Therefore if you display a date with formatdatetime() it will be displayed using local settings without your doing anything.

The problem comes in when displaying currencies. If you do calculations in USD then make sure to set the LCID to US for display (so there is no confusion about the "$" being replaced by some other currency symbol on a local machine)
and then switch the LCID back so you don't screw up everything else... Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048

mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top