473,378 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Getting client side regional settings date format

i want to know is that is it possible to get a web clients date format i.e.
like (DD/MM/YY) or (YYYY/MM/DD) from asp.net. or any other client scripting
languages
like jscript,javascript. no perl please.
if so then how. please reply
Nov 19 '05 #1
3 3572
"opticstorm" <op********@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...
i want to know is that is it possible to get a web clients date format i.e.
like (DD/MM/YY) or (YYYY/MM/DD) from asp.net. or any other client
scripting
languages
like jscript,javascript. no perl please.
if so then how. please reply


You might be able to do something with navigator.systemLanguage and/or
navigator.userLanguage - e.g. on my system, both return "en-gb", so you
could logically work out that my PC is set up with British English settings
and go from there...

http://www.google.com/search?sourcei...r+userLanguage
Nov 19 '05 #2
Request.UserLanguages would come in handy if you want to
detect a browser's Accept Language with a .Net class.

Two warnings :

1. Request.UserLanguages returns an Array
Process it accordingly.

2. The Accept Language may not be the same as the
machine's setting for date and time formats.

I know so, because on my test machine and web server they are not.

However, for 99% ( guesstimate ) of clients out there, they would be.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:eT**************@TK2MSFTNGP12.phx.gbl...
"opticstorm" <op********@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...
i want to know is that is it possible to get a web clients date format i.e.
like (DD/MM/YY) or (YYYY/MM/DD) from asp.net. or any other client scripting
languages
like jscript,javascript. no perl please.
if so then how. please reply


You might be able to do something with navigator.systemLanguage and/or
navigator.userLanguage - e.g. on my system, both return "en-gb", so you could logically
work out that my PC is set up with British English settings and go from there...

http://www.google.com/search?sourcei...r+userLanguage

Nov 19 '05 #3
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
2. The Accept Language may not be the same as the
machine's setting for date and time formats.


Yes indeed - http://west-wind.com/weblog/posts/334.aspx
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fawke101 | last post by:
Hi there, I have a field in my SQL database - dtePurchased - and the values look like this - 24/03/2004, 35/03/2004 (UK format) I wish to display this field in a table on my ASP page by using...
1
by: rerdavies | last post by:
OS: WIndows Server 2003. Currently logged in user is running with German(German) regional settings. Code fragment: System.Globalization.CultureInfo culture = new...
3
by: Karunakararao | last post by:
Hi All DateTime populaing based on regional settings In ASP.NET Application Iam using this Code: Thread.CurrentThread.CurrentCulture =...
9
by: Schfooge | last post by:
I am trying to do a homework assignment, but I am having troubles due to regional date settings. Part of the program requires a date to be read from a sequential file, which gives the date in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.