Get thousand separator

Marcelo Camarate
Marcelo Camarate used Ask the Experts™
on
Hi,

In a ASP.NET application how can I get the client-side thousand separator, date format, etc.?

Other question. Can I get the thousand separator in a javascript function?

Thanks in advance, Camarate
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Hi Camarate,

You can look at the Accept-Language request header to determine what preferred language is set on the users browser.  In that header you should see the language code and country code (i.e. "en-us") and based off of that code you can create a System.Globalization.CultureInfo object that you can use to determine how numbers are formatted in that language/country.

Does this get you in the right direction?

-Darek

Author

Commented:
Hi disrupt,

Thanks for your reply.

But, the two link that you suggested are to format numbers with a comma thousand separators. What I want is to know the thousands separator character that is active on the client side.

Regards, Camarate
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Commented:
hmm I am not sure why you would want to retrieve that can you elaborate?

Commented:
Camarate,

Are you trying to perform the formatting with Javascript on the client, or with .NET on the server?

-Darek

Author

Commented:
Hi daDarek,

Thanks for your suggestion. I'll be checking it. To answer your last question, I want to know the thousand separator in both environments, server and client side.

___________________________________________________

Hi disrupt,

Thanks for new suggestions. I'll be checking them.

________________________________________________

Hi all,

I will be going to a outside service, so I can not be checking my emails for a while. So, I will reply you as soon as possible.

Regards, Camarate

Sr. Software Engineer
Commented:
I am not confirm about your requirement. Let me know if this is solution

for(int i = numberVariable.length -1; i >= 0; i--){
    int temp = numberVariable[i];
    while(temp>0){
        test_Array.add(0, temp%10);  
        temp = temp /10;        
    }
}
 

Open in new window

Author

Commented:
Hi,

I need more time to check the suggestions because I'm involved entirely in another project.

Regards, Camarate

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial