VC++6.0 获取当前系统时间

摘自:http://blog.csdn.net/lp310018931/article/details/17632845

  1. CTime time = CTime::GetCurrentTime(); ///构造CTime对象 

  1. CString m_strTime = time.Format("%Y-%m-%d %H:%M:%S");  
  2.   
  3. 运行结果:m_strTime为 2001-8-1 12:11:05  

 

 

更多更详细的内容,可以去原网页学习。我只用了上面记录的部分。

猜你喜欢

转载自o396032767.iteye.com/blog/2298411