0

I am trying to use LogParser to return the data from my iis log files for the past 2 weeks. When I run the following I get "Error: Syntax Error: : no valid content: expecting opening parenthesis instead of token 'DATEADD(day,-14,'"

logparser "SELECT * FROM mylogfile.log WHERE date >= DATEADD(day,-14, GETDATE())" -o:datagrid

1 Answers1

0

Neither DATEADD nor GETDATE are valid function names in the LogParser language. You may check function names by running logparser -h -i:func.

What you probably want is:

WHERE date >= SUB(SYSTEM_DATE(), DURATION('14', 'd'))