标签:
time_t timer;
time(&timer);
struct tm tm;
localtime_s(&tm, &timer);
int year = tm.tm_year + 1900;
int month = tm.tm_mon + 1;
int day = tm.tm_mday;
string nDate;
if (month < 10)
{
nDate = to_string(year) + to_string(0) + to_string(month) + to_string(day);
}
else
{
nDate = to_string(year) + to_string(month) + to_string(day);
}
标签:
原文地址:http://www.cnblogs.com/qingmuyunlin/p/4446362.html