I know it has something to do with time.h, but I'm not familiar with using that header's functions. Right now I have:
It compiles, but it gives me this:Code:time_t TimeNow = time(NULL); struct tm *tm = localtime(&TimeNow); printf("%d:%d:%d", tm->tm_year, tm->tm_mon, tm->tm_mday);
The month and day make sense, but they're lacking the preceding 0s. The year just doesn't make any sense.