Dim assetLastDate As String = "your_date_string_here"
Dim out_lastDate As DateTime
Dim isParseSuccessful As Boolean = DateTime.TryParseExact(assetLastDate, "yyyy-MM-dd'T'HH:mm:ss'Z'", CultureInfo.InvariantCulture, DateTimeStyles.None, out_lastDate)
If isParseSuccessful Then
' Parsing successful, use out_lastDate
Console.WriteLine("Parsed Date: " & out_lastDate.ToString())
Else
' Parsing failed, handle error
Console.WriteLine("Failed to parse date.")
End If
Here, you will use special characters like ‘T’ and ‘Z’ which are properly escaped in your string format.