tags:

views:

34

answers:

1

Hi,

i would like to set the date format of all the dates in my web application in a central location.

i mean if the website is opened in USA it will have a format such as

3/19/2010 (March/19/2010)

while in Italy will be

19/3/2010 (19/March/2010)

i am no really concerned with how to locate the users but indeed on how to set the different date format for the whole application in one single location in c#.NET

thanks

+1  A: 

You can do this in the web.config file, using the globalization element:

Example:

<configuration>
   <system.web>
      <globalization culture="it-IT" />
   </system.web>
</configuration>
Fredrik Mörk