I am trying to count the number of hits to a specific URL on our website by analyzing our IIS logs using Log Parser 2.2. Everything seems to be working fine, except that its processing of timestamps is very confusing to me.
IIS logs have all timestamps expressed in UTC. Therefore, in my application, I convert the server time to UTC before connecting it to the request. However, when I try to request the data of the current day, I return a null score, despite the fact that I see entries in the log file. The generated request, which I am trying to run to get everything during the current day, looks something like this (the request is being executed on 11/11/2009, and I am using Arizona time):
SELECT COUNT(*)
FROM \\Server\IIS Logs\LogFiles\W3SVC1\u_ex*.log
WHERE
cs-method = 'GET'
AND cs(Referer) NOT LIKE '%ntorus%'
AND c-ip NOT LIKE '192%'
AND c-ip NOT LIKE '127%'
AND (
cs-uri-stem = '/'
OR cs-uri-stem = '/myurl')
AND sc-status BETWEEN 200 AND 299
AND date BETWEEN
TIMESTAMP('2009-11-11 07:00', 'yyyy-MM-dd hh:mm')
AND TIMESTAMP('2009-11-12 07:00', 'yyyy-MM-dd hh:mm')
, - . , . ?