CString--->COleDateTime: 方法1:COleDateTime::ParseDateTime()
CString strDate = _T("1987-06-21"); COleDateTime oleDate; oleDate.ParseDateTime(strDate, VAR_DATEVALUEONLY); 方法2:COleVariant
CString strDate = _T("1987-06-21"); COleVariant varTime(strDate); varTime.ChangeType(VT_DATE); COleDateTime oleDate(varTime); //COleDateTime oleDate; //o...
COleDateTime, CString, CTime, 字符转换阅读全文
1. ************************************************
COleDateTime time; time.ParseDateTime("2008-02-29");
if (time.GetStatus() == 1) //有效
{}
else //无效
{}
2. ***********************************************
COleDateTime t; // this one is a leap year t.SetDateTime(2000, 2, 29, 5, 0, 0); ...
COleDateTime, CTime阅读全文