>db2 "create table test123(aa timestamp)"
DB20000I The SQL command completed successfully.
>db2 "insert into test123 values (current timestamp)"
DB20000I The SQL command completed successfully.
>db2 "select * from test123 where date(aa)='2014-11-07'"
AA
--------------------------
2014-11-07-16.30.34.618413
1 record(s) selected.
>db2 "select date(aa) from test123 where date(aa)='2014-11-07'"
1
----------
2014-11-07
1 record(s) selected.
追问先谢谢你的回答。
比如:
createDate
20141009000000
20141011111111
20141030000000
20141031111111
createDate between '20141010' and '20141030'
结果应该是
20141011111111
20141030000000
本回答被提问者采纳