Change system default short date format

PROKA

Junior Contributor
Joined
Sep 3, 2003
Messages
249
Location
Bucharest
How can I change from .NET (VB or C#) the system default short date format.

Manually, I can do that by going to control panel\Regional and Language Options\Customize\Date\Short Date Format
 
On my client's computer, there's a program that switches it, and it bugs my program, so on each load, I need to switch it conform to what I need.
 
How does it bother your program? When you format dates you can specify a format string. If you need the string in a specific format then it is your responsibility to specify that format in the DateTime.ToString method. If you need to parse dates from a specific format, you should be using the DateTime.ParseExact method and specifying the format. You can't expect or depend on a default format.

A program should never change that kind of setting on a user (unless that program is specifically intended for that purpose). Just because another program does something that it shouldn't doesn't mean that your program should too.
 
Back
Top