5

I have hosted one of my site on IIS 7, WS2008. Later i have realize there is some datetime format issue, like me expecting things in dd/MM/yyyy format but it was in MM/dd/yyyy format and because of this it used to give me datetime conversion error.

So i have changed the datetime format by following step:

Control Panel -> Regional and Language Options -> Advanced

and changed registry entry

regedit >> HKEY_USERS>>DEFAULT>>Control Panel>>International

and here we have changed "sLongDate" and "sShortDate" key in dd MM yyyy format

and restarted the server.

Now, the issue is if i create new website i'll found everything is working fine including my datetime format as well

But my actual site which i have created before making all these datetime setting changes is having no change at all, still i m facing same datetime issue.

So i have deleted that site and hosted same site again with same IP address and at same port, but still same issue.

So, is it like there is some configuration of datetime for specific port.

I can not change my port.

Please suggest me proper solution.

Thanks in Advance...

Sham
  • 691
  • 2
  • 13
  • 26
  • Take a look at the following thread - see if it helps http://stackoverflow.com/questions/652465/how-many-different-places-do-you-have-to-set-date-formats-in-iis-7-0-and-win2k8 – G-Man Jun 28 '12 at 03:51

3 Answers3

19

After lot's of hunt i have found the solution of my problem:

1) Change the datetime format of your server from:

Control Panel -> Regional and Language Options -> Advanced

2) Open IIS and follow below steps: (For IIS7)

- Click on you Website
- Select .NET GLOBALIZATION option
- From Culture tab, select required Culture and UI Culture.
- Finally iisreset.
- Dones....
Sham
  • 691
  • 2
  • 13
  • 26
  • Thanks for that - I'd been struggling to find the root of the date/time parsing problems (was US vs GB globalisation.) – Rowan Jan 28 '13 at 17:16
2

Change in registry entry

regedit >> HKEY_USERS >> DEFAULT >> Control Panel >> International

and we have changed "sLongDate" and "sShortDate" key in dd MM yyyy format

and restart server.

Hristo
  • 1,805
  • 12
  • 21
Uday Gupta
  • 21
  • 2
  • i have changed my system date settings but it did not affect in my IIS. But doing above thing did worked. Thanks... – Ein2012 Sep 06 '17 at 05:58
0
  1. Change the datetime format of your server from:

    Control Panel -> Regional and Language Options -> Advanced

  2. Open IIS and follow below steps: (For IIS7)

    • Click on you Website
    • Select .NET GLOBALIZATION option
    • From Culture tab, select required Culture and UI Culture.
    • Finally iisreset.
    • Dones....

This Answer posted by Sham worked for us. We were upgrading the server and there were no changes in application or DB but after upgrade we got string format issue for date time. Above suggestion helped me...

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
Hemant
  • 1