获取系统时间
请问怎样在MFC中获取系统的当前时间,如: 2007-3-2 21:10:32
[解决办法]
CTime类
[解决办法]
CTime t = CTime::GetCurrentTime();
然后即可调用各个成员:
GetDay
Returns the day represent by the CTime object.
GetDayOfWeek
Returns the day of the week represented by the CTime object.
GetHour
Returns the hour represented by the CTime object.
GetMinute
Returns the minute represented by the CTime object.
GetMonth
Returns the month represented by the CTime object.
GetSecond
Returns the second represented by the CTime object.
GetTime
Returns a __time64_t value for the given CTime object.
GetYear
Returns the year represented by the CTime object.