我有一个包含日期的字符串,格式为“MMMyy”。怎么可能做到这一点?
样本:
string date = "MAY09";
DateTime a = DateTime.Parse("MAY09"); //Gives "2012.05.09 00:00:00"
DateTime b = DateTime.ParseExact("MAY09", "MMMyy", null); //Gives error
DateTime c = Convert.ToDateTime("MAY09"); //Gives "2012.05.09 00:00:00"
I need "2009-05-01"