Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Formatting Time: Automation Classes

To format a time

  • Use the Format member function of either COleDateTime or COleDateTimeSpan to create a character string representing the time or elapsed time.
    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.
    

For more information, see class COleVariant.

What do you want to know more about?

See Also

Date and Time: Automation Support

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.