a little bit of tech, a little bit of green, to help tame the savage techmachine.

Your VB code looks fine to me. I would suggest that you try:

varstr = "select * from test where TRUNC(rq, 'dd') =TO_DATE('30-DEC-01', 'DD-MON-YY')"

BTW, why are you still using DAO? ADO is much easier to use.


YOU CAN TRY JUST LIKE THIS

SELECT * FROM TABLE_ONE WHERE TABLE_ONE.FIELD=FORMAT('30-DEC-01',"dd-m月-yyyy")

OR YOU CAN TRY

SELECT * FROM TABLE_ONE WHERE TABLE_ONE.FIELD=CAST('30-DEC-01' AS DATE)

OR

SELECT * FROM TABLE_ONE WHERE TABLE_ONE.FIELD=TO_DATE('30-DEC-01','YYYY-MM-DD HH24:MI:SS DY')

posted on 2004-10-08 09:26  xyublog  阅读(719)  评论(0编辑  收藏  举报