How to programmatically change the shortdate format in the regional settings (1 Viewer)

genesis

Registered User.
Local time
Yesterday, 16:09
Joined
Jun 11, 2009
Messages
205
How to programmatically change the shortdate format in the regional settings.

Purpose:

I want to alter the existing shortdate format of the computer to mm/dd/yy for the program use. If the existing format is not or is in the mm/dd/yy already, change it to mm/dd/yy format.

Kindly help.
 

genesis

Registered User.
Local time
Yesterday, 16:09
Joined
Jun 11, 2009
Messages
205
Ok. I have researched in the internet already and have found code.

Call SetLocaleInfo(LCID, LOCALE_SSHORTDATE, sNewFormat)

Modified it and it worked.
 

namliam

The Mailman - AWF VIP
Local time
Today, 01:09
Joined
Aug 11, 2003
Messages
11,695
YOU DO NOT FIDDLE WITH USER SETTINGS

You just DO NOT do this! How can an application go and alter my computer settings ?? THIS IS BAD!!!
 

Users who are viewing this thread

Top Bottom