Score:0

Logparser - Selecting data in the past 2 weeks

gf flag

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
Score:0
mp flag

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'))

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.