0

i'm from turkey. our date format is : dd/mm/yyyy

when i execute datetime.now command in my localhost result is 15.01.2013. i mean true.

but in my web server result is 01.15.2013. server regional settings is ok. Localization and other settings is set to turkey.

so? where is the problem i don't understand. and sorry for my bad english.

  • This might help : http://stackoverflow.com/questions/13645441/asp-net-application-doesnt-reflect-regional-settings – Jason Evans Jan 15 '13 at 10:54

1 Answers1

0

The regional settings on your local computer seem to differ from the regional settings on your server.

You should probably pass a CultureInfo to your ToString call: http://msdn.microsoft.com/en-us/library/8tfzyc64.aspx or explicity use a FormatString like this:

.ToString("dd.MM.yyyy")
citronas
  • 19,035
  • 27
  • 96
  • 164