Extract the fragments with sscanf, fill in the struct tmfrom with the <time.h>extracted data and finally use mktimeto convert it to time_t.
time_t ParseDate(const char * str)
{
struct tm ti={0};
if(sscanf(str, "%d-%d-%d", &ti.tm_year, &ti.tm_mon, &ti.tm_day)!=3)
{
}
ti.tm_year-=1900
ti.tm_mon-=1
return mktime(&ti);
}