Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Date and Time

MFC supports several different ways of working with dates and times. These include:

  • General-purpose time classes. The CTime and CTimeSpan classes encapsulate most of the functionality associated with the ANSI-standard time library, which is declared in TIME.H.

  • Support for system clock. With MFC version 3.0, support was added to CTime for the Win32 SYSTEMTIME and FILETIME data types.

  • Support for the Automation DATE data type. DATE supports date, time, and date/time values. The COleDateTime and COleDateTimeSpan classes encapsulate this functionality. They work with the COleVariant class using Automation support.

Community Additions

© 2015 Microsoft