Hello.
I have login and logout events and i need to calculate time between them.
I guess i could group each 2 rows (each two messages) and then do the calculation, but how would you do that?
Example XML i need to query:
<Log>
<Message>
<DateTime>2009-12-02 14:38:41</DateTime>
<Priority>Local3.Info</Priority>
<Source_Host>192.168.0.100</Source_Host>
<MessageText>Dec 2 14:38:41 root: login,ng1,192.168.0.160,janis.veinbergs</MessageText>
</Message>
<Message>
<DateTime>2009-12-02 15:28:19</DateTime>
<Priority>Local3.Info</Priority>
<Source_Host>192.168.0.100</Source_Host>
<MessageText>Dec 2 15:30:33 root: logout,ng1,,janis.veinbergs</MessageText>
</Message>
<Message>
<DateTime>2009-12-02 15:29:11</DateTime>
<Priority>Local3.Info</Priority>
<Source_Host>192.168.0.100</Source_Host>
<MessageText>Dec 2 15:31:25 root: login,ng1,192.168.0.160,janis.veinbergs</MessageText>
</Message>
<Message>
<DateTime>2009-12-02 15:58:22</DateTime>
<Priority>Local3.Info</Priority>
<Source_Host>192.168.0.100</Source_Host>
<MessageText>Dec 2 16:00:37 root: logout,ng1,,janis.veinbergs</MessageText>
</Message>
</Log>
Thankyou.