change date type in query