the problem is related to the format of summarydateformat, $time_tok1.earliest$ and $time_tok1.latest$:
the first is in "%m/%d/%Y" format, the other two, instead are in relative time format.
To compare them you need to have all epochtime formats.
In other words the first quesry will be something like this
| inputlookup kv_logistics_demurrage
| eval date=strptime(date,"%m/%d/%Y"), earliest=relative_time(now(),"$time_tok1.earliest$"), latest=relative_time(now(),"$time_tok1.latest$")
| where date>earliest AND date<latest
| stats count as vesselid by zone
... View more