Overview

logEntryTime = DateTime.ParseExact(logString, "yyyyMMdd HHmmss", null);
logEntryTime = DateTime.ParseExact(logString, "yyyyMMdd hhmmss", DateTimeFormatInfo.CurrentInfo);

Custom Date and Time Format Strings

How to: convert strings to DateTime