|
-
Oct 19th, 2000, 08:56 AM
#1
Thread Starter
Fanatic Member
Anybody out there know how I can set the system date format in code? Some API or something??
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
-
Oct 19th, 2000, 09:01 AM
#2
Frenzied Member
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Oct 19th, 2000, 09:05 AM
#3
Thread Starter
Fanatic Member
Cheers, but not quite what I want.
I want to change the format of the system date, not the actual date value.
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
-
Oct 19th, 2000, 09:37 AM
#4
Lively Member
There is a registry key for date formats...
HKEY_CURRENT_USER\Control Panel\International\sLongDate
HKEY_CURRENT_USER\Control Panel\International\sShortDate
You can also modify the entries in the win.ini file. You might need a reboot for these changes to take effect though.
-
Oct 19th, 2000, 09:43 AM
#5
Thread Starter
Fanatic Member
Cheers, I could use these and force the user to re-boot, but I think that would be a bit too much for the users. 
Anybody else have a way, where I don't have to re-boot?
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
-
Oct 19th, 2000, 09:47 AM
#6
Lively Member
It might work without a reboot, that was only a guess...
Can I ask why you need to change the date format anyway ?
-
Oct 19th, 2000, 09:52 AM
#7
Thread Starter
Fanatic Member
All the machines in the company are set to English, but sometimes when something goes wrong with the machine it sets itself back to American, which screws up the existing software.
Now setting the format is a hastle as the users do not have the required permissions to do this themselves, so they have to phone somebody to do it (which usually takes a day).
Usually the affected software will just show an error message indicating that the user needs to have the format changed, but instead of going through all the delay, it would be nice if I could just change it when it is detected instead.
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
-
Oct 19th, 2000, 10:04 AM
#8
Lively Member
You can use the API 'SetLocaleInfo' to set the date and time formats.
-
Oct 19th, 2000, 10:05 AM
#9
Thread Starter
Fanatic Member
Cheers, I'll give that a go.
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
-
Oct 19th, 2000, 10:07 AM
#10
Lively Member
Just done a quick search and found this example of it....
http://vb.ora.com/ron/short_date.html
better do some work myself...
-
Oct 19th, 2000, 10:10 AM
#11
Thread Starter
Fanatic Member
Superb, thanks for all the help.
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|