Parse Datetime string

前端 未结 4 1744
被撕碎了的回忆
被撕碎了的回忆 2021-01-23 09:16

I\'m trying to convert the following string to datetime. I\'ve searched high and low and can\'t find the exact formats string and I don\'t want to resort to parsing it manually.

4条回答
  •  孤独总比滥情好
    2021-01-23 09:23

    Have you tried this:

    DateTime.ParseExact("20110828T134108+0100", "yyyyMMdd'T'HHmmsszzzz", CultureInfo.InvariantCulture);
    

提交回复
热议问题