|
定义:
Private Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long
Private Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Boolean
Private Const LOCALE_SLONGDATE = &H20
Private Const LOCALE_SSHORTDATE = &H1F
Private Const LOCALE_SDATE = &H1D
Private Const LOCALE_STIME = &H1E
lngLocale = GetSystemDefaultLCID()
调用:
'If lngLocale = 2052 Then '判断繁体 简体等
SetLocaleInfo lngLocale, LOCALE_SSHORTDATE, "yyyy-MM-dd"
SetLocaleInfo lngLocale, LOCALE_SDATE, "/" |
|