strStart = "AR_Invoice 20112023102553"
strEnd = "AR_Invoice 20112023102554"
timeFormatStart = DateTime.ParseExact(strStart.Substring(strStart.Length - 12), "HHmmss", System.Globalization.CultureInfo.InvariantCulture)
timeFormatEnd = DateTime.ParseExact(strEnd.Substring(strEnd.Length - 12), "HHmmss", System.Globalization.CultureInfo.InvariantCulture)
If timeFormatStart > timeFormatEnd Then
result = "strStart is the latest."
ElseIf timeFormatStart < timeFormatEnd Then
result = "strEnd is the latest."
Else
result = "Both have the same time."
End If
LogMessage(result)
timeFormatStart and timeFormatEnd are of Datatype System.DateTime