Quantcast
Viewing latest article 4
Browse Latest Browse All 8

Answer by Sebastião E. Alves Filho for how to convert datetime to unix timestamp in c?

What about sscanf?

struct tm tmVar;char *strVar = "YYYY-MM-DD HH:MM:SS";time_t timeVar;if(sscanf(strVar, "%d-%d-%d %d:%d:%d", &tm.tm_year, /* the other fields */)==6)    timeVar = mktime(&tmVar);else    // bad format

Viewing latest article 4
Browse Latest Browse All 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>