Select * from 表名  where  上网时间 Between :BegDate and :EndDateQuery1.ParamByName('BegDate').AsDateTime := StrToDateTime(Edit1.Text);
Query1.ParamByName('BegDate').AsDateTime := StrToDateTime(Edit1.Text+' 23:59:59');