wip on date query