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); }