How can I convert this datetime format from a webservice. The datetime value is: \"timestamp\": \"2014-04-18T14:45:00+02:00\" I wan\'t to convert it to: dd.mm.YYYY hh.mm.ss
With a regex you can do the following:
string resultString = null;
try {
resultString = Regex.Replace(subjectString, @"(\d{4})-(\d{2})-(\d{2})\w{1}(\d{2}):(\d{2}):(\d{2})\+\d{2}:\d{2}", "$3.$2.$1 $4.$5.$6", RegexOptions.IgnoreCase);
} catch (ArgumentException ex) {
// Syntax error in the regular expression
}
//18.04.2014 14.45.00