Parsing DateTime C# not working for my format -
i want parse date datetime "26 july 2015 - 17:57:37"
. problem have tried different formats on still not working.
string[] formats = { "dd mmm yyy - hh:mm:ss"}; if (datetime.tryparseexact(dateoflecture, formats, cultureinfo.invariantculture, datetimestyles.none, out tempdatetime)) { lecture.dateandtime = tempdatetime; }
i searched on internet , applied relevent formats never worked.
you have 3 problems - months, years , hours.
string[] formats = { "dd mmmm yyyy - hh:mm:ss"};
Comments
Post a Comment