| || |
Extract date from log file
I have a huge log file(text file).Every line has date and time and then log data. I have to extract date and time from one line and also from a line that is at different place to check the time diff.
I opened the file and using find(ctrl+f) window I could get the line required. Then copied it to clipboard and pasted in a new text file. Then I got the req data by reading the text file.
Is there any better way than this? I feel it is a cumbersome process.
Re: Extract date from log file
If you use the VBA 'Input Line' with EOF you could step through each line looking for your text, then when you find it parse it using InStr or Split. Type the word Input in your script, hightlight it, and press F1 to get to the help examples.