Sub Process_Globals
Type MyItem (Text As String, Date As Long)
End Sub
Sub AppStart (Args() As String)
Dim s As String = $"OPZJN7-RNVKA-GTVHN7 - 01:13:25 - 12.02.2022
OZJE4I-GY2VI-JZR2D5 - 19:17:24 - 17.02.2022
OY4GIP-Y2YPE-3G6E4M - 14:01:47 - 12.02.2022
OA7TGH-KHPDE-TIIZ5C - 14:05:56 - 12.02.2022
OKLODM-UHBJA-TNUOTH - 22:57:14 - 11.02.2022
ORBRR4-ZBULM-U2WSCR - 17:37:48 - 13.02.2022
OX6FPA-NJR4D-UGYKPI - 23:48:52 - 02.03.2022
OXOB4J-DTSMQ-A2LEDF - 00:12:52 - 12.02.2022
OBNHPX-BMCOC-BGL25O - 11:25:44 - 13.02.2022
OOKP6V-4OGDC-E7BHHX - 23:31:14 - 11.02.2022
OK3IOZ-TIJHB-COI45B - 09:25:53 - 05.04.2022
OOMJAO-6BICL-4FEVZ4 - 22:47:30 - 11.02.2022"$
DateTime.DateFormat = "HH:mm:ss - dd.MM.yyyy"
Dim lines() As String = Regex.Split("\n", s)
Dim items As List
items.Initialize
For Each line As String In lines
items.Add(CreateMyItem(line.SubString2(0, line.IndexOf(" ")), DateTime.DateParse(line.SubString(line.IndexOf(" - ") + 2))))
Next
items.SortType("Date", True)
'test
For Each item As MyItem In items
Log($"${item.Text}: $Date{item.Date}"$)
Next
End Sub
Public Sub CreateMyItem (Text As String, Date As Long) As MyItem
Dim t1 As MyItem
t1.Initialize
t1.Text = Text
t1.Date = Date
Return t1
End Sub