X
xzhxu2006
Unregistered / Unconfirmed
GUEST, unregistred user!
Date1,Date2ateTimePicker;
Time1,Time2ateTimePicker;
Date1.Kind := dtkDate; Date2.Kind := dtkDate;
Date1.Date := '2006-11-13'; Date2.Date := '2006-11-13';
Time1.Kind := dtkTime; Time2.Kind := dtkTime;
Time1.Time := '00:00:00';Time2.Time := '23:59:59';
现在我要时间在TDBegin和TDEnd之间的内容,即
ADOQuery1.Sql.Text := 'Select * from abc Where Time Between TDBegin And TDEnd '
使得TDBegin的时间等于Date1+Time1;TDEnd的时间等于Date2+Time2
我是这样写的,但是出错
ADOQuery1.Parameters.ParamByName('TDBegin').Value := Date1.Date + Time1.Time;
ADOQuery1.Parameters.ParamByName('TDEnd').Value := Date2.Date + Time2.Time;
运行时TDBegin的时间为'2013-11-05 13:12:39',TDEnd的时间为'2013-11-05 13:12:40'
请问大虾该程序错在哪里??
Time1,Time2ateTimePicker;
Date1.Kind := dtkDate; Date2.Kind := dtkDate;
Date1.Date := '2006-11-13'; Date2.Date := '2006-11-13';
Time1.Kind := dtkTime; Time2.Kind := dtkTime;
Time1.Time := '00:00:00';Time2.Time := '23:59:59';
现在我要时间在TDBegin和TDEnd之间的内容,即
ADOQuery1.Sql.Text := 'Select * from abc Where Time Between TDBegin And TDEnd '
使得TDBegin的时间等于Date1+Time1;TDEnd的时间等于Date2+Time2
我是这样写的,但是出错
ADOQuery1.Parameters.ParamByName('TDBegin').Value := Date1.Date + Time1.Time;
ADOQuery1.Parameters.ParamByName('TDEnd').Value := Date2.Date + Time2.Time;
运行时TDBegin的时间为'2013-11-05 13:12:39',TDEnd的时间为'2013-11-05 13:12:40'
请问大虾该程序错在哪里??