PROKA Posted October 9, 2006 Posted October 9, 2006 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 Quote Development & Research Department @ Elven Soft
Administrators PlausiblyDamp Posted October 9, 2006 Administrators Posted October 9, 2006 Why would you want to would be my initial question? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
PROKA Posted October 10, 2006 Author Posted October 10, 2006 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. Quote Development & Research Department @ Elven Soft
Leaders snarfblam Posted October 10, 2006 Leaders Posted October 10, 2006 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. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.