Today I was working on an existing ASP.NET application. The application is using an ASP.NET calendar control. We were creating a new environment for the testing team. The application was working fine but suddenly we realized there is some problem. The problem was with the date format. The expected date format was mm/dd/yyyy but we were getting mm-dd-yyyy (even after formating). I started working on this.
First thing I thought was that it has something to do with the environment as the code is fine (as it is working fine on other machines).
I googled a bit and found out that it is a common problem. So I thought about blogging about it in hope that it will help others.
I found out that the problem is with the "Region and Language". For that go to control panel. You need to change the date format and the region as required.
First thing I thought was that it has something to do with the environment as the code is fine (as it is working fine on other machines).
I googled a bit and found out that it is a common problem. So I thought about blogging about it in hope that it will help others.
I found out that the problem is with the "Region and Language". For that go to control panel. You need to change the date format and the region as required.
Now you need to restart the system.
Sometimes even after doing that you will not get the desired result. Then go to Administrative tab and choose this two checkboxes as shown in the image below.
Also change the System locale.
and restart the system.
If then also the problem persists then check with which language the account on with which you are running the application is created and then change it to required language.
Hope this will help.
Happy coding.
this is the manual way to change the date format of the calendar , can it is possible by coding to change the date format of the calendar , so that other system setting remains unchanged .?
ReplyDeleteplease reply soon