Solved

ASP.NET / SQL Server Express Locale / Date format settings

Posted on 2008-06-22
2
850 Views
Last Modified: 2013-11-07
We recently migrated servers and on the new server ASP.NET websites are displaying the time format incorrectly.

Not sure if this is a result of .NET settings or SQL Server settings, but basically any website using ASP.NET / SQL Server (Express) is displaying the date format as: MM-DD-YYYY.

However it should be using the DD-MM-YYYY setting instead. In the server's control panel regional settings, this has been setup.

Wondering if the .NET framework or SQL Server maintain their own locale settings somewhere and if so, where can I find these settings (I've looked but been unable to find it).

Also, SQL server is currently running as the "Local System" account, if that makes any difference.
0
Comment
Question by:bradderick
2 Comments
 
LVL 5

Accepted Solution

by:
JuckMan earned 500 total points
ID: 21843393
it depend on where you are reading the datetime values from using .net method calls like Datetime.now or from the database.
If it is from database then use the following article to figure out what your current settings are and how to change it to a different one
http://www.karaszi.com/SQLServer/info_datetime.asp

hope this helps
0
 

Author Comment

by:bradderick
ID: 21843415
It's happening to values from the database - and on the old server this was fine.

Which is why I suspect maybe locale settings need to be changed in SQL server - but haven't been able to find where to do it from.

Note the server's locale settings (specified in the windows control panel) seem to be ignored by SQL server.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question