IRohitable | January 2012

Changing default date format of your ASP.NET application

by Rohit 1. January 2012 12:14

I messed with this issue for about a month. I recently migrated an old ASP.NET 2.0 application on a private server with Windows 2008 Server R2 Enterprise OS installed. The application consists of few entry forms where date is to be entered in dd/mm/yyyy format. This application has a TextBox to enter the date and not a DateTime picker. Sometimes DateTime picker is not easy to work with when you need to enter old dates often and if you want to keep it null sometimes.

ASP.NET shows error: “Input String was not in a correct format” when date is entered in dd/mm/yyyy format. I re-checked SQL Server documentation, changed SQL Server’s default language for default login (though not recommended), but nothing seemed to solve the problem.

My last workaround with IIS Settings solved the issue.

I am using Windows Server 2008 R2 which comes with IIS 7. Open IIS and right-click the virtual directory of your application.


Tags: , , ,


About Rohit Prakash

Software Craftsman @ Fortune 100 Company. Technical Reviewer of few programming books.

A Single, Writer, Reader and Adventurist.

You can reach me at:

rohit [at]






Month List

Protected by Copyscape Web Plagiarism Software