//判断两个CS类型的时间变量,返回值0 代表相等 1代表first时间大 2代表last时间大
int sCheckDataTime(CString csFirstTime,CString csLastTIme)
{
int nYear, nMonth, nDate, nHour, nMin, nSec;
char cTime[50]={0};
WCharToMByte(csFirstTime,cTime,50);
sscanf(cTime, "%d-%d-%d %d:%d:%d", &nYear, &nMonth, &nDate, &nHour, &nMin, &nSec);
CTime tFirstTime(nYear, nMonth, nDate, nHour, nMin, nSec);
memset(cTime,0,sizeof(cTime));
WCharToMByte(csLastTIme,cTime,50);
sscanf(cTime, "%d-%d-%d %d:%d:%d", &nYear, &nMonth, &nDate, &nHour, &nMin, &nSec);
CTime tLastTime(nYear, nMonth, nDate, nHour, nMin, nSec);
if(tFirstTime == tLastTime)
{
return 0;
}
else if(tFirstTime > tLastTime)
{
return 1;
}
else
{
return 2;
}
/*CTimeSpan tSpan=tCurTime-tStart