tuakilan has asked for the wisdom of the Perl Monks concerning the following question:
Need to read a log like such, record 1 and 4 has the same id number and their time difference is more than 1 hour.
Input.log
2007-Nov-07 00:00:00 - id = 000000001 2007-Nov-07 00:30:01 - id = 000000002 2007-Nov-07 00:40:00 - id = 000000003 2007-Nov-07 01:20:01 - id = 000000001
Output Log, desired result shall be
ID LAST TIME Occurance ===================================================== 000000001 2007-Nov-07 01:20:01 1
Anyone can assist to write an algo to perform the comparison ? Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing Dates and Reoccurance
by NetWallah (Canon) on Mar 12, 2008 at 05:12 UTC | |
by tuakilan (Acolyte) on Mar 12, 2008 at 07:31 UTC | |
by NetWallah (Canon) on Mar 12, 2008 at 15:46 UTC | |
|
Re: Comparing Dates and Reoccurance
by Narveson (Chaplain) on Mar 12, 2008 at 05:35 UTC | |
| |
|
Re: Comparing Dates and Reoccurance
by apl (Monsignor) on Mar 12, 2008 at 09:51 UTC | |
|
Re: Comparing Dates and Reoccurance
by wade (Pilgrim) on Mar 12, 2008 at 23:20 UTC |