Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am moving a copy of an ASP.net web application running on a windows server 2003 box to a Windows 7 Laptop.

On the win server 2003 box the locale was set to United States and shortdate format was M/DD/YYYY. On the Windows 7 machine it is DD/MM/YYYY which is breaking the application.

I have tried changing all the locale settings under controlpanel->regions to United States and rebooting with no luck. I also tried explcitly setting the shortdate format to M/DD/YYYY under the region settings but the web application seems to ignore it.

How can I change the Windows 7 shortdate format so an ASP.net application will recognize it ?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

The best way would be to set this in the web application instead of on the operating system.

My guess is that when you try to change the locale it will only apply to the user you're logged in, and the web application is not running as that user. You'd have to change the default system locale somehow - though I think this is something the web application should take care of (.NET has support for setting any locale and date format through code/declarations).

share|improve this answer
1  
I took your advice and added: <system.web><globalization culture="en-US" uiCulture="en-US" /> to the web.config file of the asp.net project and that worked. Thanks! –  Element Apr 25 '10 at 19:05
add comment

It appears there is a mishandling of the short date (and possibly the long date format too). I've just migrated form Vista Ultimate to windows 7 Home Premium.

I've set all my settings to English (Australia) in the Language & Region Settings (done all tabs, including the advanced settings), and set the short date to display as dd-MMM-yy

My pb is opposite to Element, I had dates showing as DD-MMM-YY under Vista, both in Excel 2007 and in MS-Money 2005, but they now show as DD-MM-YY. In Excel, these fields show with an * in the format, indicating that they rely on the default Region and Language settings, but they're obviously not.

Cheers, P-F

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.