摘要:
用CTime类得到当前日期、时间、星期,格式化(详细讲解)2009/05/12 09:48 A.M.① 定义一个CTime类对象 CTime time;② 得到当前时间 time = CTime::GetCurrentTime();③ GetYear( ),GetMonth( ), GetDay( ), GetHour( ), GetMinute( ), GetSecond( ), GetDayOfWeek( ) 返回整型(int)对应项目④ 将当前时间格式化 CString date = time.Format("%Y-%m-%d %H:%M:%S %W-%A");说明: 阅读全文