The DateTime.Parse() method (explained in the previous post) only parses the date given to the selected culture. To be sure that you are using the same culture throughout the whole application (ASP .Net), you need to add the following code in the web.config of your app (this must be inserted in the <system.web> section)…

<globalization culture=en-GB uiCulture=en-GB/>

There are various cultures that can be used. In this case, I used the en-GB culture (English/United Kingdom) as the date will be passed as dd/mm/yyyy throughout the whole app. For US culture, you can use the en-US (English/United States) and the dates will be passed as mm/dd/yyyy.

For more information regarding cultures and uiculture check here.


One thought on “Globalization

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s