Logfile Parser Application seeking advice

Not too hard, you can just compare dates…

date1 >= date2

This is totally untested, I am not in front of a computer with a Xojo installation…

[code] dim fiveMinutesAgo as new Date
fiveMinutesAgo.TotalSeconds = fiveMinutesAgo.TotalSeconds - 5 * 60

dim logFile as folderitem = GetFolderItem(“c:\ex130725.log”)
dim count as Integer

if logFile<> nil and logFile.Exists then
dim t as TextInputStream = TextInputStream.Open(f)
t.Encoding = Encodings.UTF8

While Not t.EOF
  dim line as string = t.ReadLine
  if instr(line, "BJLive/Default.aspx?") > 0 then
    dim logDate as new date
    logDate.SQLDateTime = trim(line).Left(19)
    if logDate >= fiveMinutesAgo then
      count = count + 1
    end if
  end if


end if

Label1.text = str(count)[/code]

Alex von Siebenthal - Perfect :slight_smile:

I can’t thank you enough