16,471
社区成员
发帖
与我相关
我的任务
分享
m_pRecordset->Open("SELECT start_time,end_time FROM V_sendorder",
_variant_t((IDispatch*)m_pConnection,true),adOpenStatic,adLockOptimistic,adCmdText);
while (!m_pRecordset->adoEOF)
{
CString cStart_time = (LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("start_time");
CString cEnd_time = (LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("end_time");
//开始时间
WCHAR wcStartYear1 = cStart_time.GetAt(2);
WCHAR wcStartYear2 = cStart_time.GetAt(3);
WCHAR wcStartMonth1 = cStart_time.GetAt(5);
WCHAR wcStartMonth2 = cStart_time.GetAt(6);
WCHAR wcStartDay1 = cStart_time.GetAt(8);
WCHAR wcStartDay2 = cStart_time.GetAt(9);
WCHAR wcStartHour1 = cStart_time.GetAt(11);
WCHAR wcStartHour2 = cStart_time.GetAt(12);
WCHAR wcStartMin1 = cStart_time.GetAt(14);
WCHAR wcStartMin2 = cStart_time.GetAt(15);
...........