Это должно быть хорошо с long и помещает ответы в строки.
long long int lWholeThing = 20101201LL;
long long int lDate = lWholeThing % 100LL;
lWholeThing /= 100LL;
long long int lMonth = lWholeThing % 100LL;
lWholeThing /= 100LL;
long long int lYear = lWholeThing;
char sDate [3];
char sMonth [3];
char sYear [5];
sprintf (sDate, "%02d", (int) lDate);
sprintf (sMonth, "%02d", (int) lMonth);
sprintf (sYear, "%d", (int) lYear);