在DB2数据库中存储时间的时间格式是timestamp,我的SQL语句为:select * from dcontact where proctime between startime and endtime;startime和endtime是20070123格式的,怎转化成timestamp格式的,请高手赐教!!!
------解决方案--------------------------------------------------------
最后6位296000是微秒
------解决方案--------------------------------------------------------
db2 => select *from dcontact where date(proctime) between date(substr(startime ,1,4
)|| '- '||substr(startime ,5,2)|| '- '||substr(startime ,7,2)) and date(substr(endtime,1,4
)|| '- '||substr(endtime,5,2)|| '- '||substr(endtime,7,2))