2017-05-30 49 views

回答

2

看起來像ISO標準的格式,你應該使用能夠將它解析爲DateTime對象:

var parsedDate = DateTime.Parse("2017-03-31T15:20:32.620436-04:00"); 

var dateString = parsedDate.ToString("O"); 
// dateString: "2017-03-31T12:20:32.6204360-07:00" 
// Note the time has been changed to my local time zone