日期知道了,时间也就在一起吧。 试试: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 er t One character–time er string. tt Multicharacter–time er 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.
SetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SSHORTDATE,"yyyy-MM-dd");
SetLocaleInfo(GetThreadLocale, LOCALE_SSHORTDATE, PChar('yyyy-MM-dd'));这个时日期的我知道
我要时间的那个,我不知道
试试: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 er
t One character–time er string.
tt Multicharacter–time er 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.
都不可以更改系统的时间格式