共用方式為


格式化時間:Automation 類別

格式化時間

  • 使用 COleDateTimeCOleDateTimeSpan 建立表示時間的字串或已耗用時間的 格式 成員函式。

    COleDateTime time(1970, 12, 18, 17, 30, 0);
    // 18 December 1970, 5:30 PM
    CString s = time.Format(VAR_DATEVALUEONLY);
    // s contains the date formatted based on 
    // the current national language specifications
    // (locale ID). The time portion is ignored for 
    // formatting purposes in this case.   
    

如需詳細資訊,請參閱類別 COleVariant

c1ayhyhk.collapse_all(zh-tw,VS.110).gif您還想知道關於哪些方面的詳細資訊?

請參閱

概念

日期和時間:Automation 支援