#include <atlstr.h>
#include <atltime.h>
CString GetTime()
{
CString strRet;
CTime tm;
tm=CTime::GetCurrentTime();
strRet=tm.Format("%Y/%m/%d");
return strRet;
}atl工程获取系统时间
最新推荐文章于 2025-10-25 10:15:18 发布
本文介绍了一个使用ATL库中的CTime类来获取并格式化当前日期为CString类型的简单函数。该函数首先获取系统当前时间,然后将其格式化为年/月/日的字符串形式。
7719

被折叠的 条评论
为什么被折叠?



