Encog.Util.CSV.ReadCSV.ParseDate C# (CSharp) Method

ParseDate() public static method

Parse a date using the specified format.
public static ParseDate ( String when, String dateFormat ) : System.DateTime
when String A string that contains a date in the specified format.
dateFormat String The date format.
return System.DateTime
        public static DateTime ParseDate(String when, String dateFormat)
        {
            try
            {
                return DateTime.ParseExact(when, dateFormat,
                                           CultureInfo.InvariantCulture);
            }
            catch (FormatException)
            {
                return default(DateTime);
            }
        }