参考链接: C wcsftime()
wchar_t* pNewFolder = new wchar_t[30];
__time64_t long_time;
struct tm newtime;
_time64( &long_time );
errno_t err;
err = _localtime64_s( &newtime, &long_time );
if (err)
{
WSLogEx(L"Invalid Arguments for _wctime_s. Error Code: %d/n", err);
}
wcsftime(pNewFolder,30,L"%Y%m%d%H%M%S",&newtime);
此文章来自于【http://blog.csdn.net/hmzgz81/article/details/3580063】