fixed the date query issue.. (finally)