Hi All,
Could you advise me how can I subtract two dates?
I have script:
open FILE, "</net/bazz/na_2004q3/db/uca/work/comp.log" or die "Can't open file:
$!";
@records = grep /Start Seq/, <FILE>;
foreach (@records){
($segID,@time) = (split) [2,4,6,7,9];
print "$segID @time\n";
}
It produces these lines:
Seq:1 Sat Nov 13 21:57:34 PST 2004
Seq:2 Sat Nov 13 22:05:17 PST 2004
Seq:3 Sun Nov 14 03:42:01 PST 2004
Seq:4 Sun Nov 14 21:57:34 PST 2004
I need to subtract dates to know how long each Seg took time. Is there any way
to convert dates back to timestamps?
Thanks in advance
-Vladimir