Try this:

#include <time.h>

char CurrentTime[9];
char CurrentDate[9];

_strdate(CurrentDate);
_strtime(CurrentTime);