Home > Net >  C # how to convert CST Thu Nov 30 00:00:00 CST 999
C # how to convert CST Thu Nov 30 00:00:00 CST 999

Time:02-26

String s_date="Thu Nov 30 00:00:00 CST 999";
String format="DDD MMM dd HH: mm: ss CST yyyy";
DateTime parsed=DateTime. ParseExact (s_date. Replace (" CST ", "+ 2:00"), "DDD MMM dd HH: mm: ss ZZZ yyyy", the new System. Globalization, CultureInfo (" EN - GB "));
Error: the string was not recognized as valid DateTime,
  •  Tags:  
  • C#
  • Related