time_t seconds; time(&seconds); cout << seconds << endl;
This gives me a timestamp. How can I get that epoch date into a string?<
the function "ctime()" will convert a time to a string. If you want to control the way its printed, use "strftime". However, strftime() takes an argument of "struct tm". Use "localtime()" to convert the time_t 32 bit integer to a struct tm.