QUERY ONLY THE LAST DAY LOGRSS

1 reply

Last post Jul 12, 2019 05:20 PM by dsgo

  • QUERY ONLY THE LAST DAY LOG

    Jul 09, 2019 10:12 PM|dsgo|LINK

    Hi everyone, i have a doubt , i have this query but i need to set dynamically the last log of the day, How I achieve that?

    Logparser "SELECT TO_TIMESTAMP(date, time) as Fecha_Hora,cs-username as Usuario,c-ip as IP,cs(user-agent) as Dispositivo,sc-status as Status,sc-substatus as Sstatus INTO RPT_HTMO.HTML FROM C:\inetpub\logs\LogFiles\W3SVC1\u_Ex190709.log WHERE sc-status=401 and STRLEN(Usuario)>0 and Fecha_Hora>= SUB(TO_LOCALTIME(SYSTEM_TIMESTAMP()), TIMESTAMP('0000-01-01 12:00', 'yyyy-MM-dd HH:mm'))" -tpl:test.tpl

    Thanks in advance.

  • Re: QUERY ONLY THE LAST DAY LOG

    Jul 12, 2019 05:20 PM|dsgo|LINK

    Well at the end i do it with powershell script.