add rule to query date and time