Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Regional Settings

Status
Not open for further replies.

AndyGo

Programmer
Mar 30, 2002
3
IN
hi ,
is it possible 2 change the date format in regional settings before starting my application.i.e. programmatically.

regards,
andy.
 
Yes, you can change the settings in the registry (look under HKCU/Control Panel).
But changing these values would not only be considered very rude by your users, but will probably cause other applications to break. I would strongly suggest that you not do this, even if you plan to set them back when your app exits. IOW: Bad idea.

If you're trying to solve a problem like input date formatting (i.e. how to tell July 7th apart from January 1st), you need to be looking at the Date Picker control that came with VB SP3 common controls. Or.. require your users to enter dates in ISO-8601 format (yyyy-mm-dd hh:mm:ss), which works no matter what locale they're in. It's the national standard in Japan, and people in the US and Europe are becoming more used to it all the time. Plus, when dates are displayed with this format, they naturally sort (nice!).

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top