0

I have a .exe file which will generate date in MM/DD/YY if I set short date format in Regional Settings as DD/MM/YY. So when I execute the .exe manually, I get correct output.

But when I use C# Windows Service ( running as Local System), the .exe gives a different format. It means, the C# Windows Service does not read Regional Settings.
I am running on Windows XP and C# 2.0

Rauf
  • 12,326
  • 20
  • 77
  • 126
  • 1
    Can you provide the system details please. Running as Local system you need to change the registry to achieve correct data format – Ulug Toprak Aug 15 '17 at 12:06
  • Possible duplicate of [Windows Service Unable to get correct System Culture](https://stackoverflow.com/questions/26474132/windows-service-unable-to-get-correct-system-culture) – mjwills Aug 15 '17 at 12:13
  • @mjwills If I set culture info, should I set after myThread.Start() or before ? – Rauf Aug 15 '17 at 12:21
  • @Rauf As early as possible. – mjwills Aug 15 '17 at 12:23

0 Answers0