|
-
Jul 28th, 2000, 03:43 PM
#1
Thread Starter
New Member
How the h*ll do i change the format of the system date in
the regional settings via VB6 code?
M.
-
Jul 28th, 2000, 05:06 PM
#2
Hyperactive Member
Have you tried either of the following API calls
Public Declare Function SetSystemTime Lib "kernel32" Alias "SetSystemTime" (lpSystemTime As SYSTEMTIME) As Long
Public Declare Function SetSystemTimeAdjustment Lib "kernel32" Alias "SetSystemTimeAdjustment" (ByVal dwTimeAdjustment As Long, ByVal bTimeAdjustmentDisabled As Boolean) As Long
Public Declare Function SetTimeZoneInformation Lib "kernel32" Alias "SetTimeZoneInformation" (lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long
-
Jul 28th, 2000, 07:45 PM
#3
Thread Starter
New Member
still don't know what you mean...
how do i use these functions, give me an example of how to change the system date from dd/MM/yy to MM/dd/yyyy
i can work with an example..
thanx
M.
-
Jul 28th, 2000, 08:29 PM
#4
Member
Hi Mr_Pickles...
Try these codes..
Private Declare Function SetLocaleInfo Lib "KERNEL32" Alias "SetLocaleInfoA" _
(ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Long
Private Const LOCALE_USER_DEFAULT = &H400
Private Const LOCALE_SSHORTDATE = &H1F 'short date format string
'--This will change the default date format
SetTime = SetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SSHORTDATE, "MM/dd/yyyy")
[Edited by tomtan on 07-28-2000 at 09:31 PM]
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
|