Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Development & Research Department @ Elven Soft
Posted
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.
Development & Research Department @ Elven Soft
  • Leaders
Posted

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.

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...