'String was not recognized as a valid DateTime.'

  • Thread starter Thread starter polachan
  • Start date Start date
P

polachan

Guest
I am trying to get datetime including time part from the string variable

string dateString = dt.ToString("yyyy-MM-dd HH:mm:ss.FFF");
datetime dt = DateTime.ParseExact(dateString, "dd/MM/yyyy HH:mm", CultureInfo.InvariantCulture);

the value of datestring is "2019-06-19 02:15:00"

when I parse the datestring into dt the folllowing error is coming

'String was not recognized as a valid DateTime.'


Please can you help to fix the error


Regards

pol





polachan

Continue reading...
 
Back
Top