Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Reading logfile date-time

$
0
0

Hi There, good morning

I need to read a log file generated by another program, all lines of this log file begins with time data (format = 2015-05-09T06:37:03) I'll put in my script the start date/ time and the finish date/time 

I would like the script to validate that date/time and only get the records that are among this starts and finish date/time. for example get all lines >=2015-05-09T06:33:03 and <=2015-05-09T06:38:34?

 

logfile

2015-05-09T06:29:34  Some information here

2015-05-09T06:30:34 Some information here

2015-05-09T06:30:34 Some information here

2015-05-09T06:32:34 Some information here

2015-05-09T06:33:03 Some information here

2015-05-09T06:33:03 Some information here

2015-05-09T06:34:34 Some information here

2015-05-09T06:35:34 Some information here

2015-05-09T06:36:34 Some information here

2015-05-09T06:36:34 Some information here

2015-05-09T06:36:03 Some information here

2015-05-09T06:37:03 Some information here

2015-05-09T06:37:34 Some information here

2015-05-09T06:37:34 Some information here

2015-05-09T06:38:34 Some information here

2015-05-09T06:38:34 Some information here

2015-05-09T06:39:03 Some information here

2015-05-09T06:39:03 Some information here

2015-05-09T06:39:34 Some information here

2015-05-09T06:39:34 Some information here

2015-05-09T06:40:34 Some information here

2015-05-09T06:42:34 Some information here

2015-05-09T06:43:03 Some information here

2015-05-09T06:44:03 Some information here

 

Thanks in advance for any help you are able to provide.

regards

Franklin

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles