3个回答
推荐于2020-12-29
展开全部
rt
例如当前时间是14:34:55
获得当前的时间,并将时、分、秒赋值给hh,mm,ss三个变量使得hh=14,mm=34,ss=55?
--------------------------------------------------------------------------------
回复1:CTime t = CTime::GetCurrentTime();//获取当前时间.
hh = t.GetHour();
mm = t.GetMinute();
ss = t.GetSecond()
回复2:VOID GetLocalTime(
LPSYSTEMTIME lpSystemTime // address of system time structure
);
typedef struct _SYSTEMTIME{
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
}SYSTEMTIME;
回复3:VOID GetSystemTime(LPSYSTEMTIME lpSystemTime
回复4:
CTime::GetCurrentTime
回复5: SYSTEMTIME st;
GetLocalTime(&st);
hh=st.wHour;
mm=st.wMinute;
ss=st.wSecond;
回复6:CTime t = CTime::GetCurrentTime();
CString strTime;
strTime.Format("%02d:%02d:%02d", t.GetHour(),t.GetMinute(),.GetSecond());
回复7: CString str; time_t t; time(&t); struct tm tmtime; localtime_s(&tmtime, &t); str1.Format("%02u:%02u:%02u", tmtime.tm_hour, tmtime.tm_min, tmtime.tm_sec);
回复8:CTime t = CTime::GetCurrentTime();
CString strTime;
strTime.Format("%02d:%02d:%02d", t.GetHour(),t.GetMinute(),t.GetSecond());
SetWindowText(strTime);
回复9:UP
回复10:CTime t = CTime::GetCurrentTime();//获取当前时间.
hh = t.GetHour();
mm = t.GetMinute();
ss = t.GetSecond()
例如当前时间是14:34:55
获得当前的时间,并将时、分、秒赋值给hh,mm,ss三个变量使得hh=14,mm=34,ss=55?
--------------------------------------------------------------------------------
回复1:CTime t = CTime::GetCurrentTime();//获取当前时间.
hh = t.GetHour();
mm = t.GetMinute();
ss = t.GetSecond()
回复2:VOID GetLocalTime(
LPSYSTEMTIME lpSystemTime // address of system time structure
);
typedef struct _SYSTEMTIME{
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
}SYSTEMTIME;
回复3:VOID GetSystemTime(LPSYSTEMTIME lpSystemTime
回复4:
CTime::GetCurrentTime
回复5: SYSTEMTIME st;
GetLocalTime(&st);
hh=st.wHour;
mm=st.wMinute;
ss=st.wSecond;
回复6:CTime t = CTime::GetCurrentTime();
CString strTime;
strTime.Format("%02d:%02d:%02d", t.GetHour(),t.GetMinute(),.GetSecond());
回复7: CString str; time_t t; time(&t); struct tm tmtime; localtime_s(&tmtime, &t); str1.Format("%02u:%02u:%02u", tmtime.tm_hour, tmtime.tm_min, tmtime.tm_sec);
回复8:CTime t = CTime::GetCurrentTime();
CString strTime;
strTime.Format("%02d:%02d:%02d", t.GetHour(),t.GetMinute(),t.GetSecond());
SetWindowText(strTime);
回复9:UP
回复10:CTime t = CTime::GetCurrentTime();//获取当前时间.
hh = t.GetHour();
mm = t.GetMinute();
ss = t.GetSecond()
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-10-17
展开全部
SYSTEMTIME systm;
GetSystemTime(&systm);
GetSystemTime(&systm);
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-10-17
展开全部
GetLocalTime(LPSYSTEMTIME lpSystemTime)
SYSTEMTIME curTime;
GetLocalTime( &curTime );
SYSTEMTIME curTime;
GetLocalTime( &curTime );
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询