Give this a try -
COleDateTime dt = COleDateTime::GetCurrentTime();
SYSTEMTIME st{};
dt.GetAsSystemTime(st);
CString strDate, strTime, strDateTime;
int cchDate = ::GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, NULL, 0);
LPTSTR pDate = strDate.GetBufferSetLength(cchDate);
cchDate = ::GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, pDate, cchDate);
strDate.ReleaseBuffer();
int cchTime = ::GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, NULL, 0);
LPTSTR pTime = strTime.GetBufferSetLength(cchTime);
cchTime = ::GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, pTime, cchTime);
strTime.ReleaseBuffer();
strDateTime.Format(_T("%s %s"), (LPCTSTR) strDate, (LPCTSTR) strTime);
_tprintf_s(_T("%s\n"), (LPCTSTR)strDateTime);