select ydate,name,task from note where ydate>='20041001' and ydate<='20041002'
这样应该就可以了啊,查询的是ydate在2004-10-01 00:00:00到2004-10-02 23:59:59的记录