SPRING :: NOTE

[MFC] 현재 시간 얻어오기 (로컬) 본문

Development Language/C · C++ · MFC

[MFC] 현재 시간 얻어오기 (로컬)

RAYZIE 2016. 5. 9. 11:42
반응형
# 변수생성
CTime m_currTime;

# 현재 시간 얻어오기
m_currTime = CTime::GetCurrentTime();

# CString변수에 출력
CString csCurrTime;
csCurrTime.Format("%d-%02d-%02d %02d:%02d:%02d\n", 
m_currTime .GetYear(), m_currTime .GetMonth(), m_currTime .GetDay(),
m_currTime .GetHour(), m_currTime .GetMinute(), m_currTime .GetSecond());

반응형
Comments