DateTime string parsing

前端 未结 3 1834
逝去的感伤
逝去的感伤 2020-12-16 19:58

I have made a generic parser for parsing ascii files. When I want to parse dates, I use ParseExact function in DateTime object to parse, but I get problems with the year.

3条回答
  •  余生分开走
    2020-12-16 20:18

    Well, if you're definite that all your source dates are this century, then you could use parseExact against a "20"-prefixed source string.

提交回复
热议问题