Twitter date unparseable?

后端 未结 7 2036
误落风尘
误落风尘 2020-12-11 15:52

I want to convert the date string in a Twitter response to a Date object, but I always get a ParseException and I cannot see the error!?!

Input string: Thu Dec 23 18

7条回答
  •  自闭症患者
    2020-12-11 16:07

    in C# you can do like this

    DateTime date = DateTime.ParseExact(dt, "ffffd MMM dd HH:mm:ss +0000 yyyy", CultureInfo.InvariantCulture);

提交回复
热议问题