//"20071221_094910_IF.A3P.gz"
sYear = sName.Mid(0,4);
sMonth = sName.Mid(4,2);
sDay = sName.Mid(6,2);
sHour = sName.Mid(9,2);
sMin = sName.Mid(11,2);
sSec = sName.Mid(13,2);
nYear = atoi((LPCTSTR)sYear);
nMonth = atoi((LPCTSTR)sMonth);
nDay = atoi((LPCTSTR)sDay);
nHour = atoi((LPCTSTR)sHour);
nMin = atoi((LPCTSTR)sMin);
nSec = atoi((LPCTSTR)sSec);
CTime *dynamicTime;
dynamicTime = new CTime(nYear,nMonth,nDay,nHour,nMin,nSec,0);
DateTime = *dynamicTime;
delete dynamicTime;
CTime to CString:
CString s = m_timeFrom.Format( "%Y-%m-%d %H:%M:%S" );
1 条评论:
不错,很直接
发表评论