For your first error regarding that Length@messages == Length@datesAndTime
returns false, I think the problem is that the script doesn't take it into account the fact that some users use the 12-hour clock which has AM and PM at the end of the string. A simple fix would be to replace the assignment of datesAndTime
with:
datesAndTime =
StringSplit /@
StringCases[rawData,
"[" ~~ x : (DigitCharacter .. ~~ "/" ~~ DigitCharacter .. ~~ "/" ~~
DigitCharacter .. ~~ Whitespace ~~ DigitCharacter .. ~~ ":" ~~
DigitCharacter .. ~~ ":" ~~ DigitCharacter .. ~~ Whitespace ~~
LetterCharacter ..) ~~ "]" -> x]
and the assignment of messages
with:
messages =
StringSplit[rawData,
"[" ~~ DigitCharacter .. ~~ "/" ~~ DigitCharacter .. ~~ "/" ~~
DigitCharacter .. ~~ Whitespace ~~ DigitCharacter .. ~~ ":" ~~
DigitCharacter .. ~~ ":" ~~ DigitCharacter .. ~~ Whitespace ~~
LetterCharacter .. ~~ "]" ~~ Whitespace ..];
I don't get any other errors after fixing that. Let me know if this works for you!