DateTimePicker1 年月日时分秒合并 SQL语句 delphi
sqlstr2:=format('select * from '+tabname2+' where 时间>=''%S'' and 时间<=''%S'' order by 时间',[((FormatDateTime('yyyy-MM-dd', DateTimePicker1.Date)+FormatDatetime('hh:mm:ss', DateTimePicker2.Time))),((FormatDateTime('yyyy-MM-dd', DateTimePicker3.Date)+FormatDatetime('hh:mm:ss', DateTimePicker4.Time)))]);
这句话哪里出错了呀?在运行的时候显示在转化为字符串的时候出错。出错的话应该是怎么写呀?高手指教