I am trying to parse a string "20160918000500 +0200"
to DateTime
containing offset value "+0200"
.
I tried the following but it gives invalid DateTime
exception.
DateTime dtDateTime = DateTime.Parse("20160918000500 +0200",new CultureInfo("yyyyMMddHHmmss zzz"));
Is there a way to convert the String
exactly to Datetime
with UTC offset value
?