现在在做一个查询,想把2个VC的日期控件显示的日期分别做为查询的条件,该做怎么处理呢
解决方案 »
- 请教大侠 double如何转换为CString啊
- Cformview 分割后不支持中文,急求救!
- 在线等,高手进, GetDlgItem是建立临时对象,疑惑
- 怎样才能在SDI程序里面加入的dialog得到当前窗口的指针,调用mainframe的函数,和调用view里面的函数!
- 求教一个问题从系统服务中启动进程的问题
- C++大学教程中第9章类的例子的一个问题
- 一个奇怪的问题:error C3861: “sqrt”: 找不到标识符
- 请问一个C++里的基础问题...谢谢!
- 怎么样使用X509的pem 格式的密钥加密字符串
- 鼠标按在标题栏的时候SetWindowPos改变窗体大小,放开鼠标后大小恢复原样,是怎么回事?
- CListCtrl保存一列变量问题
- 精神支柱!!
select * from table where time > #20090421# and time < #20090422#
int t_Num=0;
CTime timestartT,timeendT,timestartD,timeendD;
m_MyDateTimeCtrlStartDay.GetTime(timestartD);
m_MyDateTimeCtrlEndDay.GetTime(timeendD);
m_MyDateTimeCtrlStartTime.GetTime(timestartT);
m_MyTimeDateCtrlEndTime.GetTime(timeendT);
COleDateTime timestartStrT;
timestartStrT.SetDateTime(timestartD.GetYear(),timestartD.GetMonth(),timestartD.GetDay(),timestartT.GetHour(),timestartT.GetMinute(),timestartT.GetSecond()); COleDateTime timeendStrT ;
timeendStrT .SetDateTime( timeendD.GetYear(),timeendD.GetMonth(),timeendD.GetDay(),timeendT.GetHour(),timeendT.GetMinute(),timeendT.GetSecond()); CString sqlstr="select * from T_Sys_Operstion where Time_Operstion >='"+timestartStrT.Format("%Y-%m-%d %H:%M:%S")+"' and Time_Operstion<='"+timeendStrT.Format("%Y-%m-%d %H:%M:%S")+"'";给分!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
strSql.Format("select * from a where time >'%s %s' and time<'%s %s'",
startDay.Fromat("%Y-%m-%d"),startTime.Format("%H:%M"),
endDay.Fromat("%Y-%m-%d"),endTime.Format("%H:%M"));
strSql.Format("select * from a where time >'%s %s' and time <'%s %s'",
startDay.Fromat("%Y-%m-%d"),startTime.Format("%H:%M"),
endDay.Fromat("%Y-%m-%d"),endTime.Format("%H:%M"));