CString str = "2006-12-12";
str.Replace('-', '/');
COleDateTime t1, t2;
t1.ParseDateTime(str);
t2 = COleDateTime::GetCurrentTime();
COleDateTimeSpan ts;
ts = t2-t1;
int nDay = ts.GetDays();
if(nDay>0) MessageBox("超时");
以上代码是 取得当前时间。并和str时间比较。如果当前时间大于str的时间,则超时!高手帮我改成c代码实现以上功能。不能用mfc(不能用CString等类)
str.Replace('-', '/');
COleDateTime t1, t2;
t1.ParseDateTime(str);
t2 = COleDateTime::GetCurrentTime();
COleDateTimeSpan ts;
ts = t2-t1;
int nDay = ts.GetDays();
if(nDay>0) MessageBox("超时");
以上代码是 取得当前时间。并和str时间比较。如果当前时间大于str的时间,则超时!高手帮我改成c代码实现以上功能。不能用mfc(不能用CString等类)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货