Well i am trying to parse that date
5/10/2013 002704
var stt = "5/10/2013 002704";
result = DateTime.ParseExact(stt, "dd-MM-yyyy HHmmss", CultureInfo.InvariantCulture);
but i get this Exception
String was not recognized as a valid DateTime.
However!, this code works to parse only the time *without date*
var stt = "002704";
result = DateTime.ParseExact(stt, "HHmmss", CultureInfo.InvariantCulture);
Well i hope someone helps me with that problem and thanks in advance...
HINT : THIS ALSO FAILS
var stt = "5/10/2013 002704";
result = DateTime.ParseExact(stt, "dd/MM/yyyy HHmmss", CultureInfo.InvariantCulture);
Well it works! thanks to every one helped me here for his\her very nice help that i really appreciate very much. Also i will take the XY Problem into account next time :D.