query date handling for pql