Pls answer me, how can i SET to long date fomat the date settings in regional settings? i want that when my form loads, it automatically change the date settings in the regional settings to long date format
Printable View
Pls answer me, how can i SET to long date fomat the date settings in regional settings? i want that when my form loads, it automatically change the date settings in the regional settings to long date format
If your talking about changing the systems date format rather than a single date, then you can change it via the registry..
HKEY_CURRENT_USER\Control Panel\International\sLongDate
HKEY_CURRENT_USER\Control Panel\International\sShortDate
I think one some OS (maybe Win 95) these keys don't exist, however you can change the entries in the win.ini file.
What is it your trying to do exactly, I've got some good code for changing dates from one format to another, so you won't have to change the format in the regional settings.
Code:'change the date
Private Sub Command1_Click()
Dim MyDate
MyDate = "09/20/2000" ' Assign a date.
Date = MyDate ' Change system date.
End Sub
'change the system time
'it changes it on the system but you
'must click on the time in the system tray
'and then it refreshes the system tray.
Private Sub Command1_Click()
Dim MyTime
MyTime = "09:00:10 PM" ' Assign a time."
Time = MyTime ' Set system time to MyTime.
End Sub