Nov 8 1:44
When I use this code, it fails:
string DD = "Nov 8 1:44";
try
{
DateTime.ParseExact(DD, "MMM dd HH:mm", CultureInfo.InvariantCulture);
}
catch(Exception ex)
{
MessageBox.Show("Bad day because " + ex.Message);
}
It says,
String was not recognized as a valid DateTime
Please let me know where am I wrong.
That format would be
per the MSDN you need a single
dandHdue to the fact that your source string is using a single digit day and hour.