如何用修改注册表的方法修改系统的日期格式
如何用修改注册表的方法修改系统的日期格式
需要代码
问题点数:50、回复次数:7Top
1 楼YANGYUGW(小杨)回复于 2002-12-06 16:51:56 得分 0
还有时间Top
2 楼invalid(空心菜(Python是个好东东,大家多用用!))回复于 2002-12-06 16:53:45 得分 20
用aPI函数,下面是c++版本的。
SetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SSHORTDATE,"yyyy-MM-dd");
Top
3 楼czhall(阿东)回复于 2002-12-06 16:55:58 得分 5
DELPHI是什么形式???Top
4 楼YANGYUGW(小杨)回复于 2002-12-06 17:00:45 得分 0
delphi如下
SetLocaleInfo(GetThreadLocale, LOCALE_SSHORTDATE, PChar('yyyy-MM-dd'));这个时日期的我知道
我要时间的那个,我不知道
Top
5 楼invalid(空心菜(Python是个好东东,大家多用用!))回复于 2002-12-06 19:31:48 得分 20
日期知道了,时间也就在一起吧。
试试:LOCALE_STIME或者LOCALE_STIMEFORMAT (估计是后者)
后者的帮助:
Hour, Minute, and Second Format Pictures
The format picture for a time string consists of a combination of one string from each of these format types.
Hours Meaning
h Hours without leading zeros for single-digit hours (12-hour clock).
hh Hours with leading zeros for single-digit hours (12-hour clock).
H Hours without leading zeros for single-digit hours (24-hour clock).
HH Hours with leading zeros for single-digit hours (24-hour clock).
Minutes
m Minutes without leading zeros for single-digit minutes.
mm Minutes with leading zeros for single-digit minutes.
Seconds
s Seconds without leading zeros for single-digit seconds.
ss Seconds with leading zeros for single-digit seconds.
Time marker
t One character–time marker string.
tt Multicharacter–time marker string.
Note In the preceding formats, the letters m, s, and t must be lowercase, and the letter h must be lowercase to denote the 12-hour clock or uppercase to denote the 24-hour clock.
Top
6 楼YANGYUGW(小杨)回复于 2002-12-10 09:34:10 得分 0
LOCALE_STIME或者LOCALE_STIMEFORMAT
都不可以更改系统的时间格式Top
7 楼xiufengy(石破天)回复于 2002-12-10 09:43:04 得分 5
upTop




