Solved

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

Posted on 2008-06-22
2
847 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how the fundamental information of how to create a table.

705 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now