markpalinux
asked on
SQL Syntax for Log Parser Time Date functions - Exchange 2003 Tracking Logs
Hello - I am trying to use Log Parser 2.2 to review Exchange 2003 Tracking Logs.
I want to compare the Date and Time fields to the Origination-Time field, as you can see in the Date and Time fields are separate and the Origination-Time combines the date and time.
Can someone give me advice on how I would be able to compare the two values (Date, Time) and (Origination-Time), I am looking for the difference in seconds.
http://anewmessagehasarrived.blogspot.com/2008/03/exchange-2003-statistics-with-logparser.html
Example Data:
Date 2010-3-15
Time 0:0:19 GMT
Origination-Time 2010-3-14 23:55:49 GMT
Thanks,
Mark
I want to compare the Date and Time fields to the Origination-Time field, as you can see in the Date and Time fields are separate and the Origination-Time combines the date and time.
Can someone give me advice on how I would be able to compare the two values (Date, Time) and (Origination-Time), I am looking for the difference in seconds.
http://anewmessagehasarrived.blogspot.com/2008/03/exchange-2003-statistics-with-logparser.html
Example Data:
Date 2010-3-15
Time 0:0:19 GMT
Origination-Time 2010-3-14 23:55:49 GMT
Thanks,
Mark
ASKER
This query got me the local time and removed the "gmt" , not sure how to get a diff of those time stamps via sql syntax, currently looking at powershell to read the csv and find the differences in seconds between the two times.
"c:\Program Files (x86)\Log Parser 2.2\LogParser.exe" -i:W3C -o:CSV "Select TO_LOCALTIME(TO_Timestamp(
BigReport3.csv
DateTime,MSGID,ForOrigTime
2010-03-14 20:00:19,36119119-3jdsk-23
Thanks,
Mark
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for the information.
https://www.experts-exchange.com/Programming/Languages/SQL_Syntax/
Having said that, please post your query as it stands now.