简单就是最好的
select * from table1 where substring(cast(dt as char),9)='2008-5-11',这是最近写的,不知道能看懂否(MySql)
strCmd = "select status,"
+ " DATE_FORMAT(" + tableNameOfMailStatus + ".rundate" + ",'%Y-%c-%d') as rundate,cast("
+ tableNameOfMailStatus + ".runtime as char) as runtime ,failcode from table1......