如何用修改注册表的方法修改系统的日期格式
需要代码

解决方案 »

  1.   

    用aPI函数,下面是c++版本的。
    SetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SSHORTDATE,"yyyy-MM-dd");
      

  2.   

    delphi如下
    SetLocaleInfo(GetThreadLocale, LOCALE_SSHORTDATE, PChar('yyyy-MM-dd'));这个时日期的我知道
    我要时间的那个,我不知道
      

  3.   

    日期知道了,时间也就在一起吧。
    试试: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.
      

  4.   

    LOCALE_STIME或者LOCALE_STIMEFORMAT 
    都不可以更改系统的时间格式