请问在MFC ADO access这样转换CString为CTime 对么?为什么sql语句中 不能显示出正确的结果呢 ?是sql语句问题么
CString nowtime;
CTime now=CTime::GetCurrentTime();nowtime=now.Format(_T("%Y-%m-%d"));
int nYear,nMonth,nDay;
sscanf(nowtime,"%d-%d-%d",&nYear,&nMonth,&nDay);
CTime tt(nYear,nMonth,nDay);
CSelect dlgselect;
dlgselect.m_dateFrom=tt;
dlgselect.m_dateTo=tt;
dlgselect.DoModal();
CString sql="select * from payment where name='"+theApp.name+"' and mydate between #"+"dlgselect.m_dateFrom"+"# and #"+"dlgselect.m_dateTo"+"#";