First, convert the number into long using strtol, then cast to time_t:
long
strtol
time_t
#include <cstdlib>#include <ctime>using namespace std; // to simplify answer...const char* timestr = "1464478647000";time_t timenum = (time_t) strtol(timestr, NULL, 10);